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
# 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