Test:`source command-line-options.sh && echo $@` has -- without the patch and is empty with the patch Test:`source command-line-options.sh --dry-run && echo $repo_branch` Change-Id: I860c4c6556baf3a1483d753f85d9602c73620b51
10 lines
262 B
Bash
10 lines
262 B
Bash
ARGV=$(getopt --options '' --long dry-run -- "$@")
|
|
eval set -- "$ARGV"
|
|
while true; do
|
|
case "$1" in
|
|
--dry-run) repo_upload_dry_run_arg="--dry-run"; repo_branch="finalization-dry-run"; shift ;;
|
|
--) shift; break;;
|
|
*) break
|
|
esac
|
|
done
|