(egrep and sed loop): Don't print messages about files that need no change.
authorJim Wilson <wilson@gcc.gnu.org>
Thu, 14 Jan 1993 19:29:26 +0000 (11:29 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 14 Jan 1993 19:29:26 +0000 (11:29 -0800)
From-SVN: r3239

gcc/fixinc.sco
gcc/fixinc.svr4

index ad84989..8ec8dea 100755 (executable)
@@ -145,7 +145,6 @@ while [ $# != 0 ]; do
   echo 'Checking header files:'
   for file in $files; do
     if egrep '!__STDC__' $file >/dev/null; then
-      echo Fixing $file
       if [ -r $file ]; then
        cp $file $2/$file >/dev/null 2>&1 || echo "Can't copy $file"
        chmod +w $2/$file
@@ -163,6 +162,8 @@ while [ $# != 0 ]; do
        mv $2/$file.sed $2/$file
        if cmp $file $2/$file >/dev/null 2>&1; then
           rm $2/$file
+       else
+          echo Fixed $file
        fi
       fi
     fi
index 4051674..9560e74 100755 (executable)
@@ -148,7 +148,6 @@ while [ $# != 0 ]; do
   files=`find . -name '*.h' -type f -print`
   echo 'Checking header files:'
   for file in $files; do
-      echo Fixing $file
       if [ -r $file ]; then
        cp $file $2/$file >/dev/null 2>&1 || echo "Can't copy $file"
        chmod +w $2/$file
@@ -197,6 +196,8 @@ while [ $# != 0 ]; do
        mv $2/$file.sed $2/$file
        if cmp $file $2/$file >/dev/null 2>&1; then
           rm $2/$file
+       else
+          Fixed $file
        fi
       fi
   done