test
This commit is contained in:
parent
f468cfbd82
commit
07be73ce57
@ -19,7 +19,7 @@ source functions/update_apps.sh
|
|||||||
|
|
||||||
|
|
||||||
# Parse script options
|
# Parse script options
|
||||||
while getopts ":si::rb:t:uUpSRv-:" opt
|
while getopts ":sirb:t:uUpSRv-:" opt
|
||||||
do
|
do
|
||||||
case $opt in
|
case $opt in
|
||||||
-)
|
-)
|
||||||
@ -48,10 +48,10 @@ do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
# :)
|
:)
|
||||||
# echo -e "Option: \"-$OPTARG\" requires an argument\n" && help
|
echo -e "Option: \"-$OPTARG\" requires an argument\n" && help
|
||||||
# exit
|
exit
|
||||||
# ;;
|
;;
|
||||||
b)
|
b)
|
||||||
re='^[0-9]+$'
|
re='^[0-9]+$'
|
||||||
number_of_backups=$OPTARG
|
number_of_backups=$OPTARG
|
||||||
@ -62,8 +62,15 @@ do
|
|||||||
rollback="true"
|
rollback="true"
|
||||||
;;
|
;;
|
||||||
i)
|
i)
|
||||||
|
# Check next positional parameter
|
||||||
|
eval nextopt=${!OPTIND}
|
||||||
|
# existing or starting with dash?
|
||||||
|
if [[ -n $nextopt && $nextopt != -* ]] ; then
|
||||||
|
OPTIND=$((OPTIND + 1))
|
||||||
ignore+=("$OPTARG")
|
ignore+=("$OPTARG")
|
||||||
[[ -z "$ignore" ]] && echo "\"-i\" requires an argument" && exit
|
else
|
||||||
|
echo "Option: \"-i\" requires an argument"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
t)
|
t)
|
||||||
re='^[0-9]+$'
|
re='^[0-9]+$'
|
||||||
|
Loading…
Reference in New Issue
Block a user