diff --git a/scripts/version-sync.sh b/scripts/version-sync.sh index e8888efa..4a62d26e 100755 --- a/scripts/version-sync.sh +++ b/scripts/version-sync.sh @@ -13,12 +13,12 @@ function usage { } function getopts-extra () { - declare i=1 + declare -i i=1 # if the next argument is not an option, then append it to array OPTARG while [[ ${OPTIND} -le $# && ${!OPTIND:0:1} != '-' ]]; do OPTARG[i]=${!OPTIND} - i+=1 - OPTIND+=1 + ((i += 1)) + ((OPTIND += 1)) done }