lib/Tools/fixseq
author wenzelm
Fri Sep 01 17:50:36 2000 +0200 (2000-09-01)
changeset 9788 df671fa2562a
parent 6082 590f9e3bf4d8
child 10511 efb3428c9879
permissions -rwxr-xr-x
GPLed;
more robust handling of spaces in args / file names;
wenzelm@4268
     1
#!/bin/bash
wenzelm@4268
     2
#
wenzelm@4268
     3
# $Id$
wenzelm@9788
     4
# Author: Markus Wenzel, TU Muenchen
wenzelm@9788
     5
# License: GPL (GNU GENERAL PUBLIC LICENSE)
wenzelm@4268
     6
#
wenzelm@4268
     7
# DESCRIPTION: fix references to obsolete Pure/Sequence structure
wenzelm@4268
     8
wenzelm@4268
     9
wenzelm@4268
    10
## diagnostics
wenzelm@4268
    11
wenzelm@9788
    12
PRG=$(basename "$0")
wenzelm@4268
    13
wenzelm@4268
    14
function usage()
wenzelm@4268
    15
{
wenzelm@4268
    16
  echo
wenzelm@4268
    17
  echo "Usage: $PRG [FILES|DIRS...]"
wenzelm@4268
    18
  echo
wenzelm@4268
    19
  echo "  Recursively find .ML files, fixing references to"
wenzelm@4268
    20
  echo "  the obsolete Pure/Sequence structure."
wenzelm@4268
    21
  echo
wenzelm@4268
    22
  echo "  Renames old versions of FILES by appending \"~~\"."
wenzelm@4268
    23
  echo
wenzelm@4268
    24
  exit 1
wenzelm@4268
    25
}
wenzelm@4268
    26
wenzelm@4268
    27
wenzelm@4268
    28
## process command line
wenzelm@4268
    29
wenzelm@9788
    30
[ "$#" -eq 0 -o "$1" = "-?" ] && usage
wenzelm@4268
    31
wenzelm@9788
    32
SPECS="$@"; shift "$#"
wenzelm@4268
    33
wenzelm@4268
    34
wenzelm@4268
    35
## main
wenzelm@4268
    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/fixseq.pl"