src/utils/qa/alertBqueue.csh 1.10

1.10 2009/05/14 22:27:41 kuhn
improved debugging a little and fixed the case where larrym was being converted to larrymm by adding a space after the substitution
Index: src/utils/qa/alertBqueue.csh
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/alertBqueue.csh,v
retrieving revision 1.9
retrieving revision 1.10
diff -b -B -U 4 -r1.9 -r1.10
--- src/utils/qa/alertBqueue.csh	11 Apr 2009 00:37:01 -0000	1.9
+++ src/utils/qa/alertBqueue.csh	14 May 2009 22:27:41 -0000	1.10
@@ -56,27 +56,33 @@
   | perl -wpe '$_ = lcfirst($_);' | sort -u`
 
 set debug=false
 if ( $debug == "true" ) then
-  # set contacts="kate, fan ting ann Hiram rachel Andy andy bob kayla"
-  echo "contacts $contacts"
+  echo "\ncontacts $contacts"
     set contacts=`echo $contacts | sed "s/,/ /" | sed "s/ /\n/g" \
     | perl -wpe '$_ = lcfirst($_);' | sort -u`
+  set contacts="larrym kate, fan ting ann Hiram rachel Andy andy bob larry kayla"
   echo "contacts $contacts"
 endif
 
 # replace common names with email addresses
 foreach i ( $counter )
-  set contacts=`echo $contacts | sed "s/$alias[$i]/$email[$i]/g"`
+  set contacts=`echo $contacts | sed "s/$alias[$i] /$email[$i] /g"`
   if ( $debug == "true" ) then
     echo    here5 $i
     echo    $alias[$i]
+    echo    $email[$i]
+    echo "   contacts $contacts"
+    ## send output only to selected people
+    # set contacts="ann kuhn pauline rhead kayla"
+    # set contacts="pauline rhead ann kayla"
     echo "   contacts $contacts"
   endif 
 end
 
-# set contacts="ann kuhn pauline rhead kayla"
-# set contacts="pauline rhead ann kayla"
+if ( $debug == "true" ) then
+  exit
+endif
 
 # cat Bfile | mail -c $contacts'@soe.ucsc.edu' -s "test. ignore  " $USER
 cat Bfile | mail -c $contacts'@soe.ucsc.edu' -s "B-queue alert" $USER
 rm Bfile