]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambda_delta/replace.sh
- we introduced the pointer_step rc in the perspective of proving
[helm.git] / matita / matita / contribs / lambda_delta / replace.sh
index 33bf0e3a1b73300404f223287fd7ca45978ca54e..5e281b251228abd56e37bd8cb6125acede3902c4 100644 (file)
@@ -1,8 +1,10 @@
 #!/bin/sh
 for MA in `find -name "*.ma"`; do
-   echo ${MA}; sed "s/$1/$2/g" ${MA} > ${MA}.new
+   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}.new ${MA}; fi
+      then rm -f ${MA}.new; 
+      else mv -f ${MA} ${MA}.old; mv -f ${MA}.new ${MA};
+   fi
 done
 
 unset MA