fixed install so that it accepts arguments like -s for silent (only in pika scripts)

This commit is contained in:
pika 2025-05-11 13:08:40 +02:00
parent ff2b5afb49
commit 18ebe57291

View file

@ -1,3 +1,4 @@
#!/usr/bin/env bash
packages=(
"colorscript"
"docker"
@ -20,7 +21,11 @@ _help() {
}
_install_func() {
if [ -n "$2" ]; then
curl -fsSL "https://git.k4li.de/scripts/installs/raw/branch/main/${1}.sh" | { bash -s -- "$2" || sh -s -- "$2" }
else
curl -fsSL "https://git.k4li.de/scripts/installs/raw/branch/main/${1}.sh" | { bash || sh }
fi
}
_check() {
@ -43,7 +48,7 @@ _install() {
;;
*)
if _check; then
_install_func "$1"
_install_func "$1" "$2"
fi
;;
esac