From 5079bf1fdafcd1d59c42956627b9145f83a5e755 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 22 Apr 2012 11:29:51 -0400 Subject: [PATCH] add a comment option --- .bin/er-close | 16 +++++++++++++--- .bin/er-comment | 1 + 2 files changed, 14 insertions(+), 3 deletions(-) create mode 120000 .bin/er-comment 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 -- 2.39.2