diff --git a/docker.sh b/docker.sh index 8a6adaa..1051491 100644 --- a/docker.sh +++ b/docker.sh @@ -20,6 +20,7 @@ command_exists() { getImports() { i="https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh" import="$(mktemp)" + echo_warning "importing $i into $import" if command_exists curl; then curl -fsSL $i -o $import elif command_exists wget; then @@ -30,8 +31,11 @@ getImports() { fi source "$import" + sleep 0.3 - rm "$import" + + rm "$import" && + echo_warning "cleaned $import" } init_docker() { @@ -127,10 +131,19 @@ if getImports; then case "$1" in --silent | -s) clear - echo_info "Executin $distro" - if silentexec main; then - init_docker - fi + echo_info "Executing $distro" + case "$distro" in + arch) silentexec _arch ;; + 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