src/utils/cvsTools/cvsFiles 1.5

1.5 2010/05/21 01:22:01 markd
allow specifying directories
Index: src/utils/cvsTools/cvsFiles
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/cvsTools/cvsFiles,v
retrieving revision 1.4
retrieving revision 1.5
diff -b -B -U 4 -r1.4 -r1.5
--- src/utils/cvsTools/cvsFiles	2 Jun 2007 18:29:37 -0000	1.4
+++ src/utils/cvsTools/cvsFiles	21 May 2010 01:22:01 -0000	1.5
@@ -1,12 +1,14 @@
 #!/bin/bash
 
-usage='cvsFiles [-h]
-Run cvs status and generate list of files under cvs using the current working.
+usage='cvsFiles [-h] [dir ...]
+Run cvs status and generate list of files under cvs using the current working
+or specified directories.
+
 Options:
   -h or -help - print this message'
 
-while [[ $1 == '-+' ]] ; do
+while [[ $1 == -* ]] ; do
     opt=$1
     shift
     case "$opt" in 
         -h) echo "$usage" > /dev/stderr
@@ -16,8 +18,8 @@
             exit 1 ;;
     esac
 done
 
-cvs status 2>&1 | cvsStatusFilter | awk 'BEGIN{FS="\t"} (NR>1)&&($2!="Locally_Removed"){print $1}'
+cvs status "$@" 2>&1 | cvsStatusFilter | awk 'BEGIN{FS="\t"} (NR>1)&&($2!="Locally_Removed"){print $1}'
 if [ "${PIPESTATUS[*]}" != "0 0 0" ] ; then
     exit 1
 fi