src/utils/qa/databaseAday.csh 1.11

1.11 2009/09/04 07:35:51 kuhn
added path to filename in chmod statement to stop file-not-found error. reduced size of test for proper input parameters
Index: src/utils/qa/databaseAday.csh
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/databaseAday.csh,v
retrieving revision 1.10
retrieving revision 1.11
diff -b -B -U 4 -r1.10 -r1.11
--- src/utils/qa/databaseAday.csh	5 May 2009 23:13:56 -0000	1.10
+++ src/utils/qa/databaseAday.csh	4 Sep 2009 07:35:51 -0000	1.11
@@ -41,12 +41,14 @@
 if ( $#argv == 2 ) then
   set outPath=$argv[2]
 endif
 
-if ( $choice != "today" && $choice != "yesterday" && $choice != "init" \
-     && $choice != "next") then
+# check values of choice
+echo $choice | egrep -wq "today|yesterday|init|next"
+if ( $status ) then
   echo
-  echo " you must call this script using either 'today', 'yesterday', 'init' or 'next'"
+  echo " you must call this script using either 'today', 'yesterday', \
+    'init' or 'next'"
   echo
   exit 1
 endif
 
@@ -109,9 +111,9 @@
   # (this will show when it's time to create a new list)
   echo "DO-OVER" >> $outPath/databaseAdayList 
 
   # give the file the correct permissions
-  chmod 774 databaseAdayList
+  chmod 774 $outfile/databaseAdayList
   exit 0
 endif
 
 # this is a next call -- edit the list so that the next database is at the top