lib/Tools/update_sub_sup
author kleing
Sun, 28 Dec 2014 15:42:34 +1100
changeset 59190 3a594fd13ca4
parent 52921 0ea2b657eb42
permissions -rwxr-xr-x
3 old example lemmas by Amine listed in the top 100 theorems

#!/usr/bin/env bash
#
# Author: Makarius
#
# DESCRIPTION: update Isabelle symbols involving sub/superscripts


## diagnostics

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

function usage()
{
  echo
  echo "Usage: isabelle $PRG [FILES|DIRS...]"
  echo
  echo "  Recursively find .thy/.ML files and update Isabelle symbols involving"
  echo "  sub- and superscript."
  echo
  echo "  Old versions of files are preserved by appending \"~~\"."
  echo
  exit 1
}


## process command line

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

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


## main

find $SPECS \( -name \*.ML -o -name \*.thy \) -print0 | \
  xargs -0 "$ISABELLE_HOME/lib/scripts/update_sub_sup"