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