lib/Tools/expandshort
author wenzelm
Fri Sep 01 17:50:36 2000 +0200 (2000-09-01)
changeset 9788 df671fa2562a
parent 7887 eedfff88ee40
child 10511 efb3428c9879
permissions -rwxr-xr-x
GPLed;
more robust handling of spaces in args / file names;
wenzelm@3007
     1
#!/bin/bash
wenzelm@2546
     2
#
wenzelm@2546
     3
# $Id$
wenzelm@9788
     4
# Author: Markus Wenzel, TU Muenchen
wenzelm@9788
     5
# License: GPL (GNU GENERAL PUBLIC LICENSE)
wenzelm@2546
     6
#
wenzelm@2546
     7
# DESCRIPTION: expand shorthand goal commands
wenzelm@2546
     8
wenzelm@2546
     9
wenzelm@9788
    10
PRG=$(basename "$0")
wenzelm@2546
    11
wenzelm@2546
    12
function usage()
wenzelm@2546
    13
{
wenzelm@2546
    14
  echo
wenzelm@4416
    15
  echo "Usage: $PRG [FILES|DIRS...]"
wenzelm@2546
    16
  echo
wenzelm@7498
    17
  echo "  Recursively find .ML files, expand shorthand goal commands.  Also"
wenzelm@7498
    18
  echo "  contracts uses of resolve_tac, dresolve_tac, eresolve_tac,"
wenzelm@7887
    19
  echo "  forward_tac, rewrite_goals_tac on 1-element lists; furthermore"
wenzelm@7887
    20
  echo "  expands tabs, which are forbidden in SML string constants."
wenzelm@2546
    21
  echo
wenzelm@4416
    22
  echo "  Renames old versions of files by appending \"~~\"."
wenzelm@2546
    23
  echo
wenzelm@2546
    24
  exit 1
wenzelm@2546
    25
}
wenzelm@2546
    26
wenzelm@4416
    27
wenzelm@4416
    28
## process command line
wenzelm@4416
    29
wenzelm@9788
    30
[ "$#" -eq 0 -o "$1" = "-?" ] && usage
wenzelm@4416
    31
wenzelm@9788
    32
SPECS="$@"; shift "$#"
wenzelm@2546
    33
wenzelm@2546
    34
wenzelm@2546
    35
## main
wenzelm@2546
    36
wenzelm@6082
    37
#set by configure
wenzelm@6082
    38
AUTO_PERL=perl
wenzelm@6082
    39
wenzelm@9788
    40
find $SPECS -name \*.ML -print | xargs "$AUTO_PERL" -w "$ISABELLE_HOME/lib/scripts/expandshort.pl"