wip
This commit is contained in:
parent
ad24809234
commit
428cd6e6cb
1 changed files with 18 additions and 5 deletions
23
docker.sh
23
docker.sh
|
@ -20,6 +20,7 @@ command_exists() {
|
||||||
getImports() {
|
getImports() {
|
||||||
i="https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh"
|
i="https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh"
|
||||||
import="$(mktemp)"
|
import="$(mktemp)"
|
||||||
|
echo_warning "importing $i into $import"
|
||||||
if command_exists curl; then
|
if command_exists curl; then
|
||||||
curl -fsSL $i -o $import
|
curl -fsSL $i -o $import
|
||||||
elif command_exists wget; then
|
elif command_exists wget; then
|
||||||
|
@ -30,8 +31,11 @@ getImports() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source "$import"
|
source "$import"
|
||||||
|
|
||||||
sleep 0.3
|
sleep 0.3
|
||||||
rm "$import"
|
|
||||||
|
rm "$import" &&
|
||||||
|
echo_warning "cleaned $import"
|
||||||
}
|
}
|
||||||
|
|
||||||
init_docker() {
|
init_docker() {
|
||||||
|
@ -127,10 +131,19 @@ if getImports; then
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--silent | -s)
|
--silent | -s)
|
||||||
clear
|
clear
|
||||||
echo_info "Executin $distro"
|
echo_info "Executing $distro"
|
||||||
if silentexec main; then
|
case "$distro" in
|
||||||
init_docker
|
arch) silentexec _arch ;;
|
||||||
fi
|
debian) silentexec _debian ;;
|
||||||
|
ubuntu) silentexec _ubuntu ;;
|
||||||
|
fedora) silentexec _fedora ;;
|
||||||
|
*)
|
||||||
|
echo "$distro is not supported by this script"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
init_docker
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if main; then
|
if main; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue