10555
|
1 |
#!/usr/bin/env bash
|
2546
|
2 |
#
|
|
3 |
# $Id$
|
9788
|
4 |
# Author: Markus Wenzel, TU Muenchen
|
|
5 |
# License: GPL (GNU GENERAL PUBLIC LICENSE)
|
2546
|
6 |
#
|
|
7 |
# DESCRIPTION: expand shorthand goal commands
|
|
8 |
|
|
9 |
|
10511
|
10 |
PRG="$(basename "$0")"
|
2546
|
11 |
|
|
12 |
function usage()
|
|
13 |
{
|
|
14 |
echo
|
4416
|
15 |
echo "Usage: $PRG [FILES|DIRS...]"
|
2546
|
16 |
echo
|
7498
|
17 |
echo " Recursively find .ML files, expand shorthand goal commands. Also"
|
|
18 |
echo " contracts uses of resolve_tac, dresolve_tac, eresolve_tac,"
|
7887
|
19 |
echo " forward_tac, rewrite_goals_tac on 1-element lists; furthermore"
|
|
20 |
echo " expands tabs, which are forbidden in SML string constants."
|
2546
|
21 |
echo
|
4416
|
22 |
echo " Renames old versions of files by appending \"~~\"."
|
2546
|
23 |
echo
|
|
24 |
exit 1
|
|
25 |
}
|
|
26 |
|
4416
|
27 |
|
|
28 |
## process command line
|
|
29 |
|
9788
|
30 |
[ "$#" -eq 0 -o "$1" = "-?" ] && usage
|
4416
|
31 |
|
9788
|
32 |
SPECS="$@"; shift "$#"
|
2546
|
33 |
|
|
34 |
|
|
35 |
## main
|
|
36 |
|
6082
|
37 |
#set by configure
|
|
38 |
AUTO_PERL=perl
|
|
39 |
|
9788
|
40 |
find $SPECS -name \*.ML -print | xargs "$AUTO_PERL" -w "$ISABELLE_HOME/lib/scripts/expandshort.pl"
|