Skip to content

Commit

Permalink
Fix shellcheck reported issue SC2317
Browse files Browse the repository at this point in the history
  • Loading branch information
okurz committed Jan 16, 2025
1 parent 16127e6 commit 1e9e821
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions retry
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,19 @@ options:
Disabled by default, factor defaults to 2
(binary exponential back-off).
"
exit "$1"
}

# parse arguments
opts=$(getopt \
--options +h,r:,s:,e:: \
--longoptions help,retries:,sleep:,exponential:: \
--name "$(basename "$0")" -- "$@") || usage 1
--name "$(basename "$0")" -- "$@") || { usage ; exit 1; }

eval set -- "$opts"

while [ $# -gt 0 ]; do
case "$1" in
-h | --help ) usage 0; shift ;;
-h | --help ) usage; exit 0 ;;
-r | --retries ) retries=$2; shift 2 ;;
-s | --sleep ) sleep=$2; shift 2 ;;
-e | --exponential ) exponential=${2:-2}; shift 2 ;;
Expand Down

0 comments on commit 1e9e821

Please sign in to comment.