This commit is contained in:
pika 2025-05-11 13:44:20 +02:00
parent ad24809234
commit 428cd6e6cb

View file

@ -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
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
fi
;;
*)
if main; then