lib/Tools/update_sub_sup
author wenzelm
Wed, 17 Jul 2013 09:32:08 +0200
changeset 52682 77146b576ac7
parent 52618 2077168aa8f7
child 52921 0ea2b657eb42
permissions -rwxr-xr-x
tuned;

#!/usr/bin/env bash
#
# Author: Makarius
#
# DESCRIPTION: update sub/sup control symbols


## diagnostics

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

function usage()
{
  echo
  echo "Usage: isabelle $PRG [FILES|DIRS...]"
  echo
  echo "  Recursively find .thy/.ML files and update control symbols for"
  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"