X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Freplace.sh;h=f72850165f08f0cc75658d6f020058b4b0436efd;hb=b118146b97959e6a6dde18fdd014b8e1e676a2d1;hp=2f053dec9c5122002d2c3f915c6f74b3764d00af;hpb=09b4420070d6a71990e16211e499b51dbb0742cb;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/replace.sh b/matita/matita/contribs/lambdadelta/replace.sh index 2f053dec9..f72850165 100644 --- a/matita/matita/contribs/lambdadelta/replace.sh +++ b/matita/matita/contribs/lambdadelta/replace.sh @@ -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 ground static_2 basic_2 apps_2 -name "*.ma" -or -name "*.tbl"`; do + sed "/$1/s!$2!$3!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