Enhance github helper scripts (#9888)
This commit is contained in:
@ -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; }
|
||||
|
Reference in New Issue
Block a user