Update argument handling logic

This commit is contained in:
JeremyStar™ 2024-06-02 21:12:55 +02:00
parent e89f617299
commit 881a79f4e8
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -11,15 +11,18 @@ INSTALL_GUI_PACKAGES=
# Parse arguments
for arg in "${@}"; do
if [ "${arg}" == "--noconfirm" ]; then
# I don't know what shellcheck is seeing here...
# shellcheck disable=SC2037
PACMAN_FLAGS=${PACMAN_FLAGS} --noconfirm
elif [ "${arg}" == "--gui" ]; then
INSTALL_GUI_PACKAGES=true
else
echo ":: Warning: Unknown argument \"${arg}\""
fi
case "${arg}" in
"--noconfirm")
# I don't know what shellcheck is seeing here...
# shellcheck disable=SC2037
PACMAN_FLAGS=${PACMAN_FLAGS} --noconfirm
;;
"--gui")
INSTALL_GUI_PACKAGES=true
;;
*)
echo ":: Warning: Unknown argument \"${arg}\""
esac
done
# Source /etc/os-release