From: Mike Frysinger Date: Sat, 1 Oct 2011 06:19:54 +0000 (-0400) Subject: handle bad cmdline args nicely, and filter removed files X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f2f69886bc57745efd38e30c75d97a09e483e7fb;p=home.git handle bad cmdline args nicely, and filter removed files --- diff --git a/.bin/er-close b/.bin/er-close index 7c7c4e6..e29f250 100755 --- a/.bin/er-close +++ b/.bin/er-close @@ -24,7 +24,7 @@ cl_msg= while [[ $# -ne 0 ]] ; do bug=$1 reason=$2 - shift 2 + shift 2 || usage "invalid args" if [[ -z ${bug} || -n ${bug//[0-9#]} ]] ; then usage "invalid bug" @@ -82,7 +82,7 @@ Commit message: $c$(printf '\n%s' ${urls})" cvs=$(cvs up) files=$(echo "$cvs" | awk '$1 ~ /^[MA]/ { print $NF }' | grep -v '^Manifest$') -unk_files=$(echo "$cvs" | awk '$1 !~ /^[MA]/') +unk_files=$(echo "$cvs" | awk '$1 !~ /^[MAR]/') if [[ -n ${unk_files} ]] ; then echo "unknown files:" echo "${unk_files}"