diff options
Diffstat (limited to 'maintainer')
| -rwxr-xr-x | maintainer/mutt-hooks/b4-shazam.sh | 8 | ||||
| -rwxr-xr-x | maintainer/pr-create.sh | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/maintainer/mutt-hooks/b4-shazam.sh b/maintainer/mutt-hooks/b4-shazam.sh index 4920658..478a276 100755 --- a/maintainer/mutt-hooks/b4-shazam.sh +++ b/maintainer/mutt-hooks/b4-shazam.sh @@ -1,6 +1,6 @@ #!/bin/bash -REPO_DIR=/home/cem/Source/MAINTAINER/xfs-linux +REPO_DIR=/home/cem/Source/MAINTAINER/$1 FORMAIL=$(which formail) B4=$(which b4) @@ -11,6 +11,10 @@ _die() { check_env() { + if [ -z $1 ]; then + _die "You must specify a branch" + fi + if [ ! -d $REPO_DIR ]; then _die "Linux repo does not exist" fi @@ -41,7 +45,7 @@ shazam_message() { echo "Message/Series $MSG_ID applied" } -check_env +check_env $1 MSG="" diff --git a/maintainer/pr-create.sh b/maintainer/pr-create.sh index 62721b0..36387b7 100755 --- a/maintainer/pr-create.sh +++ b/maintainer/pr-create.sh @@ -21,7 +21,7 @@ SUBJECT="" # Email tool NEOMUTT=$(which neomutt) -MUTT_CONFIG="$HOME/.mutt/muttrc-Kernel" +MUTT_CONFIG="$HOME/.mutt/muttrc-kernel" #temp files PULL_FILE=$(mktemp) @@ -116,11 +116,11 @@ TYPE=$(echo $TAG | sed 's/xfs-//' | awk '{split($0, a, "-"); print a[1]}') VER=$(echo $TAG | sed 's/xfs-//' | awk '{split($0, a, "-"); print a[2]}') RC=$(echo $TAG | sed 's/xfs-//' | awk '{split($0, a, "-"); print a[3]}') -if [ $TYPE = "merge" ] && [ $RC ]; then +if [ "$TYPE" = "merge" ] && [ "$RC" ]; then _die "Can't have a -RC tag with a merge tag" fi -if [ $TYPE = "fixes" ] && [ -z $RC ]; then +if [ "$TYPE" = "fixes" ] && [ -z "$RC" ]; then _die "A Fixes tag requires a -RC version" fi |
