Update argument handling logic
This commit is contained in:
parent
e89f617299
commit
881a79f4e8
1 changed files with 12 additions and 9 deletions
|
@ -11,15 +11,18 @@ INSTALL_GUI_PACKAGES=
|
||||||
|
|
||||||
# Parse arguments
|
# Parse arguments
|
||||||
for arg in "${@}"; do
|
for arg in "${@}"; do
|
||||||
if [ "${arg}" == "--noconfirm" ]; then
|
case "${arg}" in
|
||||||
# I don't know what shellcheck is seeing here...
|
"--noconfirm")
|
||||||
# shellcheck disable=SC2037
|
# I don't know what shellcheck is seeing here...
|
||||||
PACMAN_FLAGS=${PACMAN_FLAGS} --noconfirm
|
# shellcheck disable=SC2037
|
||||||
elif [ "${arg}" == "--gui" ]; then
|
PACMAN_FLAGS=${PACMAN_FLAGS} --noconfirm
|
||||||
INSTALL_GUI_PACKAGES=true
|
;;
|
||||||
else
|
"--gui")
|
||||||
echo ":: Warning: Unknown argument \"${arg}\""
|
INSTALL_GUI_PACKAGES=true
|
||||||
fi
|
;;
|
||||||
|
*)
|
||||||
|
echo ":: Warning: Unknown argument \"${arg}\""
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# Source /etc/os-release
|
# Source /etc/os-release
|
||||||
|
|
Loading…
Reference in a new issue