maintain classpath in more elementary manner: turn ISABELLE_CLASSPATH into -classpath option, so that all jars are covered by sun.misc.Launcher.AppClassLoader (e.g. relevant for loading add-on resources);
ignore $ISABELLE_JAVA_EXT -- do not change java.ext.dirs;
#!/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"