| author | skalberg | 
| Tue, 21 Oct 2003 11:09:23 +0200 | |
| changeset 14242 | ec70653a02bf | 
| parent 10555 | 2323ec838401 | 
| child 14981 | e73f8140af78 | 
| 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 | 
| 5 | # License: GPL (GNU GENERAL PUBLIC LICENSE) | |
| 5213 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 6 | # | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 7 | # 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 | 8 | |
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 9 | |
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 10 | ## diagnostics | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 11 | |
| 10511 | 12 | PRG="$(basename "$0")" | 
| 5213 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 13 | |
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 14 | function usage() | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 15 | {
 | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 16 | echo | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 17 | echo "Usage: $PRG [FILES|DIRS...]" | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 18 | echo | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 19 | 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 | 20 | echo " the new datatype package" | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 21 | echo | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 22 | echo " Renames old versions of FILES by appending \"~~\"." | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 23 | echo | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 24 | exit 1 | 
| 
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 | |
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 28 | ## process command line | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 29 | |
| 9788 | 30 | [ "$#" -eq 0 -o "$1" = "-?" ] && usage | 
| 5213 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 31 | |
| 9788 | 32 | SPECS="$@"; shift "$#" | 
| 5213 
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 | |
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 35 | ## main | 
| 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 36 | |
| 6082 | 37 | #set by configure | 
| 38 | AUTO_PERL=perl | |
| 39 | ||
| 5213 
0aa62210e67c
Script that adapts theories and proof scripts to new datatype package.
 berghofe parents: diff
changeset | 40 | find $SPECS \( -name \*.thy -o -name \*.ML \) -print | \ | 
| 9788 | 41 | xargs "$AUTO_PERL" -w "$ISABELLE_HOME/lib/scripts/fixdatatype.pl" |