Enhance github helper scripts (#9887)

This commit is contained in:
Scott Lahteine 2018-03-01 20:40:53 -06:00 committed by GitHub
parent cd4c35c543
commit 63b13588a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 34 additions and 21 deletions

View file

@ -16,6 +16,8 @@ usage() {
echo "Usage: `basename $0` [1|2] [branch]" 1>&2
}
[[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { usage; exit 1; }
CURR=$(git branch 2>/dev/null | grep ^* | sed 's/\* //g')
[[ -z $CURR ]] && { echo "No git repository here!" 1>&2 ; exit 1; }
[[ $CURR == "(no"* ]] && { echo "Git is busy with merge, rebase, etc." 1>&2 ; exit 1; }