lib/Tools/fixdatatype
changeset 5213 0aa62210e67c
child 6082 590f9e3bf4d8
equal deleted inserted replaced
5212:2bc5b5cf0516 5213:0aa62210e67c
       
     1 #!/bin/bash
       
     2 #
       
     3 # $Id$
       
     4 #
       
     5 # DESCRIPTION: adapt theories and proof scripts to new datatype package
       
     6 
       
     7 
       
     8 ## diagnostics
       
     9 
       
    10 PRG=$(basename $0)
       
    11 
       
    12 function usage()
       
    13 {
       
    14   echo
       
    15   echo "Usage: $PRG [FILES|DIRS...]"
       
    16   echo
       
    17   echo "  Recursively find .thy/.ML files, adapting them to"
       
    18   echo "  the new datatype package"
       
    19   echo
       
    20   echo "  Renames old versions of FILES by appending \"~~\"."
       
    21   echo
       
    22   exit 1
       
    23 }
       
    24 
       
    25 
       
    26 ## process command line
       
    27 
       
    28 [ $# -eq 0 -o "$1" = "-?" ] && usage
       
    29 
       
    30 SPECS="$@"; shift $#
       
    31 
       
    32 
       
    33 ## main
       
    34 
       
    35 find $SPECS \( -name \*.thy -o -name \*.ML \) -print | \
       
    36   xargs perl -w $ISABELLE_HOME/lib/scripts/fixdatatype.pl