]> git.wh0rd.org Git - home.git/commitdiff
handle bad cmdline args nicely, and filter removed files
authorMike Frysinger <vapier@gentoo.org>
Sat, 1 Oct 2011 06:19:54 +0000 (02:19 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 28 Apr 2012 19:36:40 +0000 (15:36 -0400)
.bin/er-close

index 7c7c4e62c937e9cd40aedf520c74669d1f342ae3..e29f250b05ab8571a6fdcfca1f5c76b320a3f1f6 100755 (executable)
@@ -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}"