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() {
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue