lib/Tools/expandshort
changeset 26579 13bbc72fda45
parent 26578 e6511a920168
child 26580 c3e597a476fd
equal deleted inserted replaced
26578:e6511a920168 26579:13bbc72fda45
     1 #!/usr/bin/env bash
       
     2 #
       
     3 # $Id$
       
     4 # Author: Markus Wenzel, TU Muenchen
       
     5 #
       
     6 # DESCRIPTION: expand shorthand goal commands
       
     7 
       
     8 
       
     9 PRG="$(basename "$0")"
       
    10 
       
    11 function usage()
       
    12 {
       
    13   echo
       
    14   echo "Usage: $PRG [FILES|DIRS...]"
       
    15   echo
       
    16   echo "  Recursively find .ML files, expand shorthand goal commands.  Also"
       
    17   echo "  contracts uses of resolve_tac, dresolve_tac, eresolve_tac,"
       
    18   echo "  forward_tac, rewrite_goals_tac on 1-element lists; furthermore"
       
    19   echo "  expands tabs, which are forbidden in SML string constants."
       
    20   echo
       
    21   echo "  Renames old versions of files by appending \"~~\"."
       
    22   echo
       
    23   exit 1
       
    24 }
       
    25 
       
    26 
       
    27 ## process command line
       
    28 
       
    29 [ "$#" -eq 0 -o "$1" = "-?" ] && usage
       
    30 
       
    31 SPECS="$@"; shift "$#"
       
    32 
       
    33 
       
    34 ## main
       
    35 
       
    36 #set by configure
       
    37 AUTO_PERL=perl
       
    38 
       
    39 find $SPECS -name \*.ML -print | xargs "$AUTO_PERL" -w "$ISABELLE_HOME/lib/scripts/expandshort.pl"