author | wenzelm |
Tue, 26 Apr 2005 19:50:57 +0200 | |
changeset 15847 | c05c7670f166 |
parent 15800 | f2215ed00438 |
permissions | -rwxr-xr-x |
15800
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
1 |
#!/usr/bin/env bash |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
2 |
# |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
3 |
# $Id$ |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
4 |
# Author: Makarius |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
5 |
# |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
6 |
# DESCRIPTION: adapt theories and ML files to new CPure/Pure arrangement |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
7 |
|
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
8 |
|
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
9 |
## diagnostics |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
10 |
|
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
11 |
PRG="$(basename "$0")" |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
12 |
|
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
13 |
function usage() |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
14 |
{ |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
15 |
echo |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
16 |
echo "Usage: $PRG [FILES|DIRS...]" |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
17 |
echo |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
18 |
echo " Recursively find .thy/.ML files, adapting them to" |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
19 |
echo " the new CPure/Pure arrangement" |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
20 |
echo |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
21 |
echo " Renames old versions of FILES by appending \"~~\"." |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
22 |
echo |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
23 |
exit 1 |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
24 |
} |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
25 |
|
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
26 |
|
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
27 |
## process command line |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
28 |
|
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
29 |
[ "$#" -eq 0 -o "$1" = "-?" ] && usage |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
30 |
|
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
31 |
SPECS="$@"; shift "$#" |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
32 |
|
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
33 |
|
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
34 |
## main |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
35 |
|
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
36 |
#set by configure |
15847
c05c7670f166
restored AUTO_BASH/PERL -- beware of ./configure!
wenzelm
parents:
15800
diff
changeset
|
37 |
AUTO_PERL=perl |
15800
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
38 |
|
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
39 |
find $SPECS \( -name \*.thy -o -name \*.ML \) -print | \ |
f2215ed00438
adapt theories and ML files to new CPure/Pure arrangement;
wenzelm
parents:
diff
changeset
|
40 |
xargs "$AUTO_PERL" -w "$ISABELLE_HOME/lib/scripts/fixcpure.pl" |