Skip to content

Commit

Permalink
Make the -i getops compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
Antiz96 committed Jul 16, 2024
1 parent ccf9f26 commit 8e71484
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions admin/checkservices
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ usage() {
# set options as global vars
argparse() {
local opt
while getopts 'AahFfLlPpRrSsUuZzi' opt; do
while getopts 'AahFfLlPpRrSsUuZzi:' opt; do
case $opt in
A) AUTOCONFIRM=0;; a) AUTOCONFIRM=1;;
F) FAILED=0;; f) FAILED=1;;
Expand All @@ -270,13 +270,10 @@ argparse() {
S) STATUS=0;; s) STATUS=1;;
U) USER_SLICE=0;; u) USER_SLICE=1;;
Z) SERIALIZE=0;; z) SERIALIZE=1;;
i) shift $((OPTIND-1))
while [[ "$1" != "" && "$1" != -* && "$1" == *.service ]]; do
IGNORED_SERVICES+=("$1")
shift
done
OPTIND=1
;;
i) if [[ "$OPTARG" == *.service ]]; then
IGNORED_SERVICES+=("$OPTARG")
fi
;;
*) usage;;
esac
done
Expand Down

0 comments on commit 8e71484

Please sign in to comment.