Added an argument shift and simplified conditional case

This commit is contained in:
Alex Tavarez
2025-09-17 12:05:42 -04:00
parent fb906b659c
commit 92cfaebb66

View File

@@ -9,7 +9,9 @@ if [ -z "$1" ]; then
exit 1
fi
if ! [ -z "$1" ] && [ "$1" == "upgrades" ]; then
if [ -n "$1" ] && [ "$1" == "upgrades" ]; then
shift
while getopts "r:" opt; do
case "$opt" in
r) REGEX=${OPTARG};;