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