src/utils/qa/removeAlphas 1.2

1.2 2009/07/02 18:41:12 rhead
Added a few more details to the usage statement.
Index: src/utils/qa/removeAlphas
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/removeAlphas,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -B -U 1000000 -r1.1 -r1.2
--- src/utils/qa/removeAlphas	16 Jun 2009 21:54:31 -0000	1.1
+++ src/utils/qa/removeAlphas	2 Jul 2009 18:41:12 -0000	1.2
@@ -1,35 +1,37 @@
 #!/usr/bin/awk -f
 
 # takes a list of tables and a trackDb.ra file, and removes the line
 # "release alpha" from the corresponding block.  Writes results to stdout.
 
 BEGIN {
   if (ARGC != 3) {
     print "wrong # args: removeAlphas tableList trackDb.ra" > "/dev/stderr"
+    print "Takes a list of tables and a trackDb.ra file, and removes the release" > "/dev/stderr"
+    print "alpha lines from the corresponding blocks.  Writes whole file to stdout." > "/dev/stderr"
     exit 1
   }
   tblFile = ARGV[1]
   ARGV[1] = ""
   while ((status = getline tbl <tblFile) > 0) {
     tables[tbl] = 1
   }
   if (status < 0) {
     print "Error: cannot read " tblFile > "/dev/stderr"
     exit 1
   }
   close(tblFile)
   inTblBlock = 0
 }
 
 ($1 == "track") && tables[$2] {
   inTblBlock = 1
 }
 
 NF == 0 {
   inTblBlock = 0
 }
 
 (inTblBlock && ($1 != "release") && ($2 != "alpha")) || !inTblBlock {
   print $0
 }