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