fixed install so that it accepts arguments like -s for silent (only in pika scripts)
This commit is contained in:
parent
ff2b5afb49
commit
18ebe57291
1 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
packages=(
|
||||
"colorscript"
|
||||
"docker"
|
||||
|
@ -20,7 +21,11 @@ _help() {
|
|||
}
|
||||
|
||||
_install_func() {
|
||||
curl -fsSL "https://git.k4li.de/scripts/installs/raw/branch/main/${1}.sh" | { bash || sh }
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue