8e5ead54b3aa2196f535ac04c682d91ea22748a9 kuhn Mon Dec 3 16:08:25 2012 -0800 added two levels of backup protection in genecats directory because script writes directly there diff --git src/utils/qa/checkAllStaticLinks.csh src/utils/qa/checkAllStaticLinks.csh index 2ba8857..3893a3b 100755 --- src/utils/qa/checkAllStaticLinks.csh +++ src/utils/qa/checkAllStaticLinks.csh @@ -64,16 +64,30 @@ set dir=`echo $dir | sed "s@/@.@g"` if ( $dir == 0 ) then set dir=htdocs endif tail -20 $dir.err | grep -q "errors in 0 files" if ( $status ) then cat $dir.err >> $outfile echo "\n ===================================\n" >> $outfile @ errors = $errors + 1 endif rm -f $dir.err @ errdirs = $errdirs + 1 end echo " checked $errdirs directories" >> $outfile echo " found $errors with errors" >> $outfile + +# allow two levels of backup +set genecats = "/usr/local/apache/htdocs-genecats/qa/test-results/staticLinks" + +if ( -e $genecats/$outfile ) then + if ( -e $genecats/$outfile.bak ) then + # echo "there's a bak file" + # echo "making a bak2 file" + mv $genecats/$outfile.bak $genecats/${outfile}.bak2 + endif + # echo "making a bak file" + mv $genecats/$outfile $genecats/${outfile}.bak +endif +echo "moving file to genecats dir" mv $outfile /usr/local/apache/htdocs-genecats/qa/test-results/staticLinks