|
@ -7,7 +7,7 @@ |
|
|
# - Remote (upstream) Org name (MarlinFirmware) |
|
|
# - Remote (upstream) Org name (MarlinFirmware) |
|
|
# - Remote (origin) Org name (your Github username) |
|
|
# - Remote (origin) Org name (your Github username) |
|
|
# - Repo Name (Marlin, MarlinDocumentation) |
|
|
# - Repo Name (Marlin, MarlinDocumentation) |
|
|
# - PR Target branch (bugfix-1.1.x, bugfix-2.0.x, etc.) |
|
|
# - PR Target branch (bugfix-1.1.x, bugfix-2.0.x, dev-2.1.x, etc.) |
|
|
# - Branch Arg (the branch argument or current branch) |
|
|
# - Branch Arg (the branch argument or current branch) |
|
|
# - Current Branch |
|
|
# - Current Branch |
|
|
# |
|
|
# |
|
@ -42,19 +42,19 @@ while [[ $# -gt 0 ]]; do |
|
|
|
|
|
|
|
|
case "$opt" in |
|
|
case "$opt" in |
|
|
-*|--*) MORE="$MORE$opt " ; [[ $EQUALS == 1 ]] && MORE="$MORE=$val" ;; |
|
|
-*|--*) MORE="$MORE$opt " ; [[ $EQUALS == 1 ]] && MORE="$MORE=$val" ;; |
|
|
1|2) INDEX=$opt ;; |
|
|
1|2|3) INDEX=$opt ;; |
|
|
*) BRANCH="$opt" ;; |
|
|
*) BRANCH="$opt" ;; |
|
|
esac |
|
|
esac |
|
|
|
|
|
|
|
|
done |
|
|
done |
|
|
|
|
|
|
|
|
case "$REPO" in |
|
|
case "$REPO" in |
|
|
Marlin ) TARG=bugfix-1.1.x ; [[ $INDEX == 2 ]] && TARG=bugfix-2.0.x ;; |
|
|
Marlin ) TARG=bugfix-1.1.x ; [[ $INDEX == 2 ]] && TARG=bugfix-2.0.x ; [[ $INDEX == 3 ]] && TARG=dev-2.1.x ;; |
|
|
MarlinDocumentation ) TARG=master ;; |
|
|
MarlinDocumentation ) TARG=master ;; |
|
|
esac |
|
|
esac |
|
|
|
|
|
|
|
|
[[ $BRANCH =~ ^[0-9]$ ]] && USAGE=1 |
|
|
[[ $BRANCH =~ ^[123]$ ]] && USAGE=1 |
|
|
|
|
|
|
|
|
[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2] [branch]" 1>&2 ; exit 1 ; } |
|
|
[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2|3] [branch]" 1>&2 ; exit 1 ; } |
|
|
|
|
|
|
|
|
echo "$ORG $FORK $REPO $TARG $BRANCH $CURR $MORE" |
|
|
echo "$ORG $FORK $REPO $TARG $BRANCH $CURR $MORE" |
|
|