portabilite de script sed
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7732 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
7e7ce6e349
commit
db85ff05ef
|
@ -5,14 +5,14 @@ MAX_SAVE = 10
|
|||
backup:
|
||||
cp camlp4boot camlp4boot.save.0
|
||||
set -e; for i in camlp4boot.save.*; do \
|
||||
mv $$i camlp4boot.evas.$$((`echo $$i | sed -e 's/.*\.save\.\([0-9]\+\)/\1/'` + 1)); \
|
||||
mv $$i camlp4boot.evas.$$((`echo $$i | sed -e 's/.*\.save\.\([0-9][0-9]*\)/\1/'` + 1)); \
|
||||
done
|
||||
set -e; for i in camlp4boot.evas.*; do mv $$i $${i/.evas./.save.}; done
|
||||
rm -f camlp4boot.save.$(MAX_SAVE)
|
||||
|
||||
restore:
|
||||
set -e; for i in camlp4boot.save.*; do \
|
||||
mv $$i camlp4boot.evas.$$((`echo $$i | sed -e 's/.*\.save\.\([0-9]\+\)/\1/'` - 1)); \
|
||||
mv $$i camlp4boot.evas.$$((`echo $$i | sed -e 's/.*\.save\.\([0-9][0-9]*\)/\1/'` - 1)); \
|
||||
done
|
||||
set -e; for i in camlp4boot.evas.*; do mv $$i $${i/.evas./.save.}; done
|
||||
mv camlp4boot.save.0 camlp4boot
|
||||
|
|
Loading…
Reference in New Issue