]> git.wh0rd.org Git - home.git/commitdiff
add a comment option
authorMike Frysinger <vapier@gentoo.org>
Sun, 22 Apr 2012 15:29:51 +0000 (11:29 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 28 Apr 2012 19:36:47 +0000 (15:36 -0400)
.bin/er-close
.bin/er-comment [new symlink]

index fa9ffdac5d083080478be31c43b6862a3e8d86d5..da018b173b60f62f995b75ee35d0f2531fd68368 100755 (executable)
@@ -3,7 +3,8 @@
 . ~/.profile.d/gentoo.sh
 
 op=${0##*/}
-op=${op%-close}
+ops=( ${op//-/ } )
+op=${ops[0]}
 tdir="${HOME}/.cache/bugz"
 mkdir -p "${tdir}"
 find "${tdir}" -mmin +30 -type f -delete
@@ -72,10 +73,19 @@ doit() {
        for (( n=0; n < ${#bugs[@]}; ++n )) ; do
                b=${bugs[$n]}
                c=${comments[$n]}
-               run "$@" gbugz -q modify ${b} --fixed -c "\
+               local msg="Commit message: $c$(printf '\n%s' ${urls})"
+
+               case ${ops[1]} in
+               close)
+                       run "$@" gbugz -q modify ${b} --fixed -c "\
 should be all set now in the tree; thanks for the report!
 
-Commit message: $c$(printf '\n%s' ${urls})"
+${msg}"
+                       ;;
+               comment)
+                       run "$@" gbugz -q modify ${b} -c "${msg}"
+                       ;;
+               esac
        done
        echo
 }
diff --git a/.bin/er-comment b/.bin/er-comment
new file mode 120000 (symlink)
index 0000000..fc468e2
--- /dev/null
@@ -0,0 +1 @@
+er-close
\ No newline at end of file