lib/Tools/fixclasimp
author wenzelm
Tue, 04 Nov 1997 17:16:26 +0100
changeset 4130 9fac2370a2f4
parent 4077 8ce7c713968c
child 4508 f102cb0140fe
permissions -rwxr-xr-x
tuned usage;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4077
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
     1
#!/bin/bash
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
     2
#
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
     3
# $Id$
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
     4
#
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
     5
# DESCRIPTION: fix references to implicit claset and simpset
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
     6
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
     7
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
     8
## diagnostics
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
     9
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    10
PRG=$(basename $0)
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    11
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    12
function usage()
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    13
{
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    14
  echo
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    15
  echo "Usage: $PRG [FILES|DIRS...]"
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    16
  echo
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    17
  echo "  Recursively find .ML files, fixing references to"
4130
9fac2370a2f4 tuned usage;
wenzelm
parents: 4077
diff changeset
    18
  echo "  implicit claset and simpset."
4077
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    19
  echo
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    20
  echo "  Renames old versions of FILES by appending \"~~\"."
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    21
  echo
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    22
  exit 1
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    23
}
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    24
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    25
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    26
## process command line
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    27
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    28
[ $# -eq 0 -o "$1" = "-?" ] && usage
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    29
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    30
SPECS="$@"; shift $#
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    31
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    32
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    33
## main
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    34
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    35
PERL=$(type -path perl)
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    36
if [ -z $PERL ]; then
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    37
  echo "$PRG fatal error: no perl!?"
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    38
else
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    39
  find $SPECS -name \*.ML -print | xargs $PERL $ISABELLE_HOME/lib/scripts/fixclasimp.pl
8ce7c713968c fix references to implicit claset and simpset;
wenzelm
parents:
diff changeset
    40
fi