lib/Tools/update_cartouches
author wenzelm
Wed, 19 Aug 2015 21:51:30 +0200
changeset 60979 fb3a641bc914
parent 58610 fffdbce036db
child 61492 3480725c71d2
permissions -rwxr-xr-x
clarified x86-windows setup;

#!/usr/bin/env bash
#
# Author: Makarius
#
# DESCRIPTION: update theory syntax to use cartouches


## diagnostics

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

function usage()
{
  echo
  echo "Usage: isabelle $PRG [FILES|DIRS...]"
  echo
  echo "  Recursively find .thy files and update theory syntax to use cartouches"
  echo "  instead of old-style {* verbatim *} or \`alt_string\` tokens."
  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 \*.thy -print0 | \
  xargs -0 "$ISABELLE_TOOL" java isabelle.Update_Cartouches