Index: mttroot/mtt/bin/trans/mtt_update ================================================================== --- mttroot/mtt/bin/trans/mtt_update +++ mttroot/mtt/bin/trans/mtt_update @@ -11,10 +11,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.21 2003/08/14 10:33:46 gawthrop +## Ignore if and endif +## ## Revision 1.20 2003/08/13 15:49:39 gawthrop ## Don't sort the states when defaulting - leave in implied order ## ## Revision 1.19 2003/08/05 15:29:36 gawthrop ## Now handles ss.r files with implicit zero values @@ -111,19 +114,21 @@ } ## Remove if, end and endif from list remove_if() { file=$1 - tmpfile="$1_tmp" - - mv ${file} ${tmpfile} - grep -v 'if[ (]\|endif;' <${tmpfile} > ${file} - - ## Delete empty file - size=`ls -s ${file} | awk '{print $1}'` - if [ "${size}" = "0" ]; then - rm $file + if [ -f ${file} ]; then + tmpfile="$1_tmp" + + mv ${file} ${tmpfile} + grep -v 'if[ (]\|endif;' <${tmpfile} > ${file} + + ## Delete empty file + size=`ls -s ${file} | awk '{print $1}'` + if [ "${size}" = "0" ]; then + rm $file + fi fi } rm -f mtt_empty touch mtt_empty