Added an argument shift and simplified conditional case
This commit is contained in:
@@ -9,7 +9,9 @@ if [ -z "$1" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [ -z "$1" ] && [ "$1" == "upgrades" ]; then
|
if [ -n "$1" ] && [ "$1" == "upgrades" ]; then
|
||||||
|
shift
|
||||||
|
|
||||||
while getopts "r:" opt; do
|
while getopts "r:" opt; do
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
r) REGEX=${OPTARG};;
|
r) REGEX=${OPTARG};;
|
||||||
|
Reference in New Issue
Block a user