lib/Tools/update_semicolons
author wenzelm
Sat, 23 May 2015 17:19:37 +0200
changeset 60299 5ae2a2e74c93
parent 58861 5ff61774df11
permissions -rwxr-xr-x
clarified NEWS: document_files are officially required since Isabelle2014, but the absence was tolerated as legacy feature;

#!/usr/bin/env bash
#
# Author: Makarius
#
# DESCRIPTION: remove obsolete semicolons from theory sources


## diagnostics

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

function usage()
{
  echo
  echo "Usage: isabelle $PRG [FILES|DIRS...]"
  echo
  echo "  Recursively find .thy files and remove obsolete semicolons."
  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_Semicolons