lib/Tools/expandshort
author wenzelm
Tue, 24 Jul 2007 19:44:32 +0200
changeset 23961 9e7e1e309ebd
parent 15847 c05c7670f166
permissions -rwxr-xr-x
Multithreading in Poly/ML (version 5.1).
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
2546
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
     2
#
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
     3
# $Id$
9788
wenzelm
parents: 7887
diff changeset
     4
# Author: Markus Wenzel, TU Muenchen
2546
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
     5
#
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
     6
# DESCRIPTION: expand shorthand goal commands
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
     7
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
     8
10511
wenzelm
parents: 9788
diff changeset
     9
PRG="$(basename "$0")"
2546
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    10
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    11
function usage()
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    12
{
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    13
  echo
4416
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    14
  echo "Usage: $PRG [FILES|DIRS...]"
2546
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    15
  echo
7498
1e5585fd3632 expandshort usage: forward_tac;
wenzelm
parents: 6082
diff changeset
    16
  echo "  Recursively find .ML files, expand shorthand goal commands.  Also"
1e5585fd3632 expandshort usage: forward_tac;
wenzelm
parents: 6082
diff changeset
    17
  echo "  contracts uses of resolve_tac, dresolve_tac, eresolve_tac,"
7887
eedfff88ee40 tuned usage;
wenzelm
parents: 7498
diff changeset
    18
  echo "  forward_tac, rewrite_goals_tac on 1-element lists; furthermore"
eedfff88ee40 tuned usage;
wenzelm
parents: 7498
diff changeset
    19
  echo "  expands tabs, which are forbidden in SML string constants."
2546
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    20
  echo
4416
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    21
  echo "  Renames old versions of files by appending \"~~\"."
2546
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    22
  echo
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    23
  exit 1
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    24
}
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    25
4416
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    26
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    27
## process command line
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    28
9788
wenzelm
parents: 7887
diff changeset
    29
[ "$#" -eq 0 -o "$1" = "-?" ] && usage
4416
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    30
9788
wenzelm
parents: 7887
diff changeset
    31
SPECS="$@"; shift "$#"
2546
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    32
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    33
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    34
## main
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    35
6082
590f9e3bf4d8 configure AUTO_BASH, AUTO_PERL;
wenzelm
parents: 4508
diff changeset
    36
#set by configure
15847
c05c7670f166 restored AUTO_BASH/PERL -- beware of ./configure!
wenzelm
parents: 15574
diff changeset
    37
AUTO_PERL=perl
6082
590f9e3bf4d8 configure AUTO_BASH, AUTO_PERL;
wenzelm
parents: 4508
diff changeset
    38
9788
wenzelm
parents: 7887
diff changeset
    39
find $SPECS -name \*.ML -print | xargs "$AUTO_PERL" -w "$ISABELLE_HOME/lib/scripts/expandshort.pl"