| author | nipkow | 
| Thu, 02 Dec 2004 12:28:09 +0100 | |
| changeset 15363 | 885a40edcdba | 
| parent 14981 | e73f8140af78 | 
| child 15574 | b1d1b5bfc464 | 
| permissions | -rwxr-xr-x | 
| 10555 | 1 | #!/usr/bin/env bash | 
| 5213 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 2 | # | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 3 | # $Id$ | 
| 9788 | 4 | # Author: Markus Wenzel, TU Muenchen | 
| 5213 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 5 | # | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 6 | # DESCRIPTION: adapt theories and proof scripts to new datatype package | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 7 | |
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 8 | |
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 9 | ## diagnostics | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 10 | |
| 10511 | 11 | PRG="$(basename "$0")" | 
| 5213 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 12 | |
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 13 | function usage() | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 14 | {
 | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 15 | echo | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 16 | echo "Usage: $PRG [FILES|DIRS...]" | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 17 | echo | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 18 | echo " Recursively find .thy/.ML files, adapting them to" | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 19 | echo " the new datatype package" | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 20 | echo | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 21 | echo " Renames old versions of FILES by appending \"~~\"." | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 22 | echo | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 23 | exit 1 | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 24 | } | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 25 | |
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 26 | |
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 27 | ## process command line | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 28 | |
| 9788 | 29 | [ "$#" -eq 0 -o "$1" = "-?" ] && usage | 
| 5213 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 30 | |
| 9788 | 31 | SPECS="$@"; shift "$#" | 
| 5213 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 32 | |
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 33 | |
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 34 | ## main | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 35 | |
| 6082 | 36 | #set by configure | 
| 37 | AUTO_PERL=perl | |
| 38 | ||
| 5213 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 39 | find $SPECS \( -name \*.thy -o -name \*.ML \) -print | \ | 
| 9788 | 40 | xargs "$AUTO_PERL" -w "$ISABELLE_HOME/lib/scripts/fixdatatype.pl" |