From f2f69886bc57745efd38e30c75d97a09e483e7fb Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 1 Oct 2011 02:19:54 -0400 Subject: [PATCH] handle bad cmdline args nicely, and filter removed files --- .bin/er-close | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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}" -- 2.39.5