Skip to content

Instantly share code, notes, and snippets.

View rbenito's full-sized avatar

Rafael Benito rbenito

View GitHub Profile
while [[ $# -gt 0 ]] && [[ ."$1" = .-* ]] ;
do
opt="$1";
shift; #expose next argument
case "$opt" in
"--" ) break 2;;
"-b" )
BRANCH_PATH="$1"; shift;;
"-branch" ) # alternate format
BRANCH_PATH="$1"; shift;;