]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/replace.sh
syntactic components detached from basic_2 become static_2
[helm.git] / matita / matita / contribs / lambdadelta / replace.sh
index 2f053dec9c5122002d2c3f915c6f74b3764d00af..fcc328a85b694da2ebb5259a597afd483dda4678 100644 (file)
@@ -1,11 +1,10 @@
 #!/bin/sh
-for MA in `find -name "*.ma"`; do
-#for MA in `find -name "cpg*.ma" -or -name "cpx*.ma"`; do
-   echo ${MA}; sed "s!$1!$2!g" ${MA} > ${MA}.new
-   if diff ${MA} ${MA}.new > /dev/null; 
-      then rm -f ${MA}.new; 
-      else mv -f ${MA} ${MA}.old; mv -f ${MA}.new ${MA};
+for SRC in `find grond_2 static_2 basic_2 apps_2 -name "*.ma" -or -name "*.tbl"`; do
+   sed "s!$1!$2!g" ${SRC} > ${SRC}.new
+   if [ ! -s ${SRC}.new ] || diff ${SRC} ${SRC}.new > /dev/null; 
+      then rm -f ${SRC}.new; 
+      else echo ${SRC}; mv -f ${SRC} ${SRC}.old; mv -f ${SRC}.new ${SRC};
    fi
 done
 
-unset MA
+unset SRC