lib/Tools/fixdots
author wenzelm
Wed Nov 22 21:41:39 2000 +0100 (2000-11-22)
changeset 10511 efb3428c9879
parent 9788 df671fa2562a
child 10555 2323ec838401
permissions -rwxr-xr-x
tuned;
wenzelm@3824
     1
#!/bin/bash
wenzelm@3824
     2
#
wenzelm@3824
     3
# $Id$
wenzelm@9788
     4
# Author: Markus Wenzel, TU Muenchen
wenzelm@9788
     5
# License: GPL (GNU GENERAL PUBLIC LICENSE)
wenzelm@3824
     6
#
wenzelm@3824
     7
# DESCRIPTION: ensure that dots in formulas are followed by non-idents
wenzelm@3824
     8
wenzelm@3824
     9
wenzelm@3824
    10
## diagnostics
wenzelm@3824
    11
wenzelm@10511
    12
PRG="$(basename "$0")"
wenzelm@3824
    13
wenzelm@3824
    14
function usage()
wenzelm@3824
    15
{
wenzelm@3824
    16
  echo
wenzelm@3824
    17
  echo "Usage: $PRG [FILES|DIRS...]"
wenzelm@3824
    18
  echo
wenzelm@3824
    19
  echo "  Recursively find .thy/.ML files, patching them to ensure that"
wenzelm@3824
    20
  echo "  dots in formulas are followed by non-idents."
wenzelm@3824
    21
  echo
wenzelm@3826
    22
  echo "  Renames old versions of FILES by appending \"~~\"."
wenzelm@3826
    23
  echo
wenzelm@3824
    24
  exit 1
wenzelm@3824
    25
}
wenzelm@3824
    26
wenzelm@3824
    27
wenzelm@3824
    28
## process command line
wenzelm@3824
    29
wenzelm@9788
    30
[ "$#" -eq 0 -o "$1" = "-?" ] && usage
wenzelm@3824
    31
wenzelm@9788
    32
SPECS="$@"; shift "$#"
wenzelm@3824
    33
wenzelm@3824
    34
wenzelm@3824
    35
## main
wenzelm@3824
    36
wenzelm@6082
    37
#set by configure
wenzelm@6082
    38
AUTO_PERL=perl
wenzelm@6082
    39
wenzelm@4508
    40
find $SPECS \( -name \*.thy -o -name \*.ML \) -print | \
wenzelm@9788
    41
  xargs "$AUTO_PERL" -w "$ISABELLE_HOME/lib/scripts/fixdots.pl"