lib/Tools/fixheaders
author wenzelm
Fri, 01 Jul 2005 14:41:57 +0200
changeset 16653 c12c2f411f77
parent 16471 c487e7e8865f
child 16704 89cc9172f0be
permissions -rwxr-xr-x
isatool install: removed KDE option;

#!/usr/bin/env bash
#
# $Id$
# Author: Florian Haftmann, TUM
#
# DESCRIPTION: migrates theory header (of new-style theories) to non-deprecated syntax


## diagnostics

PRG="$(basename "$0")"

function usage()
{
  echo
  echo "Usage: $PRG [FILES|DIRS...]"
  echo
  echo "  Recursively find .thy files, patching them to ensure that"
  echo "  theory headers (of new-style theories) are in non-deprecated format."
  echo
  echo "  Renames old versions of FILES by appending \"~~\"."
  echo
  exit 1
}


## process command line

[ "$#" -eq 0 -o "$1" = "-?" ] && usage

SPECS="$@"; shift "$#"


## main

#set by configure
AUTO_PERL=perl

find $SPECS \( -name \*.thy -o -name \*.ML \) -print | \
  xargs "$AUTO_PERL" -w "$ISABELLE_HOME/lib/scripts/fixheaders.pl"