Created
April 23, 2019 20:16
-
-
Save nmccready/e766ab5ba53c2b34e51fa03d89a7ff22 to your computer and use it in GitHub Desktop.
argument collector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
set -o pipefail | |
# collect arguments to forward on | |
while [[ "$#" > 0 ]]; do case $1 in | |
# example to save value | |
# -v|--data-volume) shift; dataVolume=$1;; # --data-volume someval | |
*) args[${#args[@]}]=$1;; | |
esac; shift; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment