From: Mike Frysinger Date: Sun, 22 Apr 2012 15:29:51 +0000 (-0400) Subject: add a comment option X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=5079bf1fdafcd1d59c42956627b9145f83a5e755;p=home.git add a comment option --- diff --git a/.bin/er-close b/.bin/er-close index fa9ffda..da018b1 100755 --- a/.bin/er-close +++ b/.bin/er-close @@ -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 index 0000000..fc468e2 --- /dev/null +++ b/.bin/er-comment @@ -0,0 +1 @@ +er-close \ No newline at end of file