| author | wenzelm |
| Tue, 26 Apr 2005 19:50:57 +0200 | |
| changeset 15847 | c05c7670f166 |
| parent 15574 | b1d1b5bfc464 |
| permissions | -rwxr-xr-x |
| 10555 | 1 |
#!/usr/bin/env bash |
|
3824
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
2 |
# |
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
3 |
# $Id$ |
| 9788 | 4 |
# Author: Markus Wenzel, TU Muenchen |
|
3824
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
5 |
# |
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
6 |
# DESCRIPTION: ensure that dots in formulas are followed by non-idents |
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
7 |
|
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
8 |
|
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
9 |
## diagnostics |
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
10 |
|
| 10511 | 11 |
PRG="$(basename "$0")" |
|
3824
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
12 |
|
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
13 |
function usage() |
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
14 |
{
|
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
15 |
echo |
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
16 |
echo "Usage: $PRG [FILES|DIRS...]" |
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
17 |
echo |
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
18 |
echo " Recursively find .thy/.ML files, patching them to ensure that" |
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
19 |
echo " dots in formulas are followed by non-idents." |
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
20 |
echo |
| 3826 | 21 |
echo " Renames old versions of FILES by appending \"~~\"." |
22 |
echo |
|
|
3824
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
23 |
exit 1 |
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
24 |
} |
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
25 |
|
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
26 |
|
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
27 |
## process command line |
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
28 |
|
| 9788 | 29 |
[ "$#" -eq 0 -o "$1" = "-?" ] && usage |
|
3824
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
30 |
|
| 9788 | 31 |
SPECS="$@"; shift "$#" |
|
3824
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
32 |
|
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
33 |
|
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
34 |
## main |
|
9fdde15e3215
ensure that dots in formulas are followed by non-idents;
wenzelm
parents:
diff
changeset
|
35 |
|
| 6082 | 36 |
#set by configure |
|
15847
c05c7670f166
restored AUTO_BASH/PERL -- beware of ./configure!
wenzelm
parents:
15574
diff
changeset
|
37 |
AUTO_PERL=perl |
| 6082 | 38 |
|
| 4508 | 39 |
find $SPECS \( -name \*.thy -o -name \*.ML \) -print | \ |
| 9788 | 40 |
xargs "$AUTO_PERL" -w "$ISABELLE_HOME/lib/scripts/fixdots.pl" |