lib/Tools/fixdatatype
author wenzelm
Sat, 21 Nov 1998 12:17:18 +0100
changeset 5944 dcc446da8e19
parent 5213 0aa62210e67c
child 6082 590f9e3bf4d8
permissions -rwxr-xr-x
added undos, redos;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5213
0aa62210e67c Script that adapts theories and proof scripts to new datatype package.
berghofe
parents:
diff changeset
     1
#!/bin/bash
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$
0aa62210e67c Script that adapts theories and proof scripts to new datatype package.
berghofe
parents:
diff changeset
     4
#
0aa62210e67c Script that adapts theories and proof scripts to new datatype package.
berghofe
parents:
diff changeset
     5
# 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
     6
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
## diagnostics
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
PRG=$(basename $0)
0aa62210e67c Script that adapts theories and proof scripts to new datatype package.
berghofe
parents:
diff changeset
    11
0aa62210e67c Script that adapts theories and proof scripts to new datatype package.
berghofe
parents:
diff changeset
    12
function usage()
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
  echo
0aa62210e67c Script that adapts theories and proof scripts to new datatype package.
berghofe
parents:
diff changeset
    15
  echo "Usage: $PRG [FILES|DIRS...]"
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 "  Recursively find .thy/.ML files, adapting them to"
0aa62210e67c Script that adapts theories and proof scripts to new datatype package.
berghofe
parents:
diff changeset
    18
  echo "  the new datatype package"
0aa62210e67c Script that adapts theories and proof scripts to new datatype package.
berghofe
parents:
diff changeset
    19
  echo
0aa62210e67c Script that adapts theories and proof scripts to new datatype package.
berghofe
parents:
diff changeset
    20
  echo "  Renames old versions of FILES by appending \"~~\"."
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
  exit 1
0aa62210e67c Script that adapts theories and proof scripts to new datatype package.
berghofe
parents:
diff changeset
    23
}
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
## process command line
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
[ $# -eq 0 -o "$1" = "-?" ] && usage
0aa62210e67c Script that adapts theories and proof scripts to new datatype package.
berghofe
parents:
diff changeset
    29
0aa62210e67c Script that adapts theories and proof scripts to new datatype package.
berghofe
parents:
diff changeset
    30
SPECS="$@"; shift $#
0aa62210e67c Script that adapts theories and proof scripts to new datatype package.
berghofe
parents:
diff changeset
    31
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
## main
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
find $SPECS \( -name \*.thy -o -name \*.ML \) -print | \
0aa62210e67c Script that adapts theories and proof scripts to new datatype package.
berghofe
parents:
diff changeset
    36
  xargs perl -w $ISABELLE_HOME/lib/scripts/fixdatatype.pl