10555
|
1 |
#!/usr/bin/env bash
|
4268
|
2 |
#
|
|
3 |
# $Id$
|
9788
|
4 |
# Author: Markus Wenzel, TU Muenchen
|
|
5 |
# License: GPL (GNU GENERAL PUBLIC LICENSE)
|
4268
|
6 |
#
|
|
7 |
# DESCRIPTION: fix references to obsolete Pure/Sequence structure
|
|
8 |
|
|
9 |
|
|
10 |
## diagnostics
|
|
11 |
|
10511
|
12 |
PRG="$(basename "$0")"
|
4268
|
13 |
|
|
14 |
function usage()
|
|
15 |
{
|
|
16 |
echo
|
|
17 |
echo "Usage: $PRG [FILES|DIRS...]"
|
|
18 |
echo
|
|
19 |
echo " Recursively find .ML files, fixing references to"
|
|
20 |
echo " the obsolete Pure/Sequence structure."
|
|
21 |
echo
|
|
22 |
echo " Renames old versions of FILES by appending \"~~\"."
|
|
23 |
echo
|
|
24 |
exit 1
|
|
25 |
}
|
|
26 |
|
|
27 |
|
|
28 |
## process command line
|
|
29 |
|
9788
|
30 |
[ "$#" -eq 0 -o "$1" = "-?" ] && usage
|
4268
|
31 |
|
9788
|
32 |
SPECS="$@"; shift "$#"
|
4268
|
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/fixseq.pl"
|