lib/Tools/expandshort
author wenzelm
Tue, 16 Dec 1997 12:17:22 +0100
changeset 4416 c32a5c724263
parent 3007 e5efa177ee0c
child 4508 f102cb0140fe
permissions -rwxr-xr-x
improved;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3007
e5efa177ee0c removed -norc;
wenzelm
parents: 2588
diff changeset
     1
#!/bin/bash
2546
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
     2
#
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
     3
# $Id$
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
     4
#
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
     5
# DESCRIPTION: expand shorthand goal commands
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
     6
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
     7
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
     8
PRG=$(basename $0)
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
     9
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    10
function usage()
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    11
{
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    12
  echo
4416
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    13
  echo "Usage: $PRG [FILES|DIRS...]"
2546
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    14
  echo
4416
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    15
  echo "  Recursively find .ML files, expand shorthand goal commands."
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    16
  echo "  Also contracts uses of resolve_tac, dresolve_tac, eresolve_tac,"
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    17
  echo "  rewrite_goals_tac on 1-element lists; furthermore expands tabs,"
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    18
  echo "  since they are now forbidden in ML string constants."
2546
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    19
  echo
4416
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    20
  echo "  Renames old versions of files by appending \"~~\"."
2546
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    21
  echo
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    22
  exit 1
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    23
}
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    24
4416
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    25
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    26
## process command line
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    27
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    28
[ $# -eq 0 -o "$1" = "-?" ] && usage
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    29
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    30
SPECS="$@"; shift $#
2546
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    31
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    32
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    33
## main
866957616069 expand shorthand goal commands;
wenzelm
parents:
diff changeset
    34
4416
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    35
PERL=$(type -path perl)
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    36
if [ -z $PERL ]; then
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    37
  echo "$PRG fatal error: no perl!?"
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    38
else
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    39
  find $SPECS -name \*.ML -print | xargs $PERL $ISABELLE_HOME/lib/scripts/expandshort.pl
c32a5c724263 improved;
wenzelm
parents: 3007
diff changeset
    40
fi