]> andersk Git - moira.git/commitdiff
don't report error if nothing to print.
authormar <mar>
Mon, 22 Jun 1992 11:02:58 +0000 (11:02 +0000)
committermar <mar>
Mon, 22 Jun 1992 11:02:58 +0000 (11:02 +0000)
gen/letter.sh

index c6ff6a052443785aab70b88dc3ef3ca34242cb44..e6e5e690d8c4d8f6bd03b8b8741f92272c89e480 100644 (file)
@@ -22,8 +22,12 @@ if [ "`echo $last | $colrm 1 4 | $colrm 7`" = \
      "`ls -l $savefile | $colrm 1 32 | $colrm 7`" ]; then
        mv $newfile $savefile
 else
-       cat $newfile >> $savefile
-       echo "Reg_extra letter printing error" | /bin/mail dbadmin
+       if [ -s $savefile ]; then
+               cat $newfile >> $savefile
+               echo "Reg_extra letter printing error" | /bin/mail dbadmin
+       else
+               mv $newfile $savefile
+       fi
 fi
 
 $lpr -P$printer -h $savefile
This page took 0.69358 seconds and 5 git commands to generate.