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: generate keyword files for Emacs Proof General
## diagnostics
PRG="$(basename "$0")"
function usage()
{
echo
echo "Usage: isabelle $PRG [OPTIONS] [SESSIONS ...]"
echo
echo " Options are:"
echo " -d DIR include session directory"
echo " -k NAME specific name of keywords collection (default: empty)"
echo
echo " Generate keyword files for Emacs Proof General from Isabelle sessions."
echo
exit 1
}
## process command line
# options
declare -a DIRS=()
KEYWORDS_NAME=""
while getopts "d:k:" OPT
do
case "$OPT" in
d)
DIRS["${#DIRS[@]}"]="$OPTARG"
;;
k)
KEYWORDS_NAME="$OPTARG"
;;
\?)
usage
;;
esac
done
shift $(($OPTIND - 1))
## main
isabelle_admin_build jars || exit $?
declare -a JAVA_ARGS; eval "JAVA_ARGS=($ISABELLE_BUILD_JAVA_OPTIONS)"
"$ISABELLE_TOOL" java "${JAVA_ARGS[@]}" isabelle.Keywords keywords \
"$KEYWORDS_NAME" "${DIRS[@]}" $'\n' "$@"