lib/Tools/update_then
author blanchet
Mon, 15 Feb 2016 12:47:52 +0100
changeset 62319 6b01bff94d87
parent 61216 4ca490f09ec6
child 62449 1785cbadd226
permissions -rwxr-xr-x
rephrased message

#!/usr/bin/env bash
#
# Author: Makarius
#
# DESCRIPTION: expand old Isar command conflations 'hence' and 'thus'


## diagnostics

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

function usage()
{
  echo
  echo "Usage: isabelle $PRG [FILES|DIRS...]"
  echo
  echo "  Recursively find .thy files and expand old Isar command conflations:"
  echo
  echo "    hence  ~>  then have"
  echo "    thus   ~>  then show"
  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_Then