lib/Tools/fixgoal
author wenzelm
Sat, 24 Nov 2001 16:54:32 +0100
changeset 12282 f98beaaa7c4f
parent 10555 2323ec838401
child 14981 e73f8140af78
permissions -rwxr-xr-x
generic_merge;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10555
2323ec838401 /usr/bin/env bash;
wenzelm
parents: 10511
diff changeset
     1
#!/usr/bin/env bash
5045
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
     2
#
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
     3
# $Id$
9788
wenzelm
parents: 6082
diff changeset
     4
# Author: Markus Wenzel, TU Muenchen
wenzelm
parents: 6082
diff changeset
     5
# License: GPL (GNU GENERAL PUBLIC LICENSE)
5045
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
     6
#
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
     7
# DESCRIPTION: replace goal(w) commands by implicit versions Goal(w)
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
     8
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
     9
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    10
## diagnostics
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    11
10511
wenzelm
parents: 9788
diff changeset
    12
PRG="$(basename "$0")"
5045
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    13
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    14
function usage()
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    15
{
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    16
  echo
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    17
  echo "Usage: $PRG [FILES|DIRS...]"
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    18
  echo
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    19
  echo "  Recursively find .ML files, replacing goal(w)"
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    20
  echo "  commands by implicit versions Goal(w)"
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    21
  echo
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    22
  echo "  Renames old versions of FILES by appending \"~~\"."
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    23
  echo
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    24
  exit 1
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    25
}
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    26
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    27
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    28
## process command line
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    29
9788
wenzelm
parents: 6082
diff changeset
    30
[ "$#" -eq 0 -o "$1" = "-?" ] && usage
5045
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    31
9788
wenzelm
parents: 6082
diff changeset
    32
SPECS="$@"; shift "$#"
5045
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    33
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    34
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    35
## main
a19e5c91a1ab replace goal(w) commands by implicit versions Goal(w);
wenzelm
parents:
diff changeset
    36
6082
590f9e3bf4d8 configure AUTO_BASH, AUTO_PERL;
wenzelm
parents: 5045
diff changeset
    37
#set by configure
590f9e3bf4d8 configure AUTO_BASH, AUTO_PERL;
wenzelm
parents: 5045
diff changeset
    38
AUTO_PERL=perl
590f9e3bf4d8 configure AUTO_BASH, AUTO_PERL;
wenzelm
parents: 5045
diff changeset
    39
9788
wenzelm
parents: 6082
diff changeset
    40
find $SPECS -name \*.ML -print | xargs "$AUTO_PERL" -w "$ISABELLE_HOME/lib/scripts/fixgoal.pl"