There is now one single option -i for generating theory browsing
information instead of the two options -h and -g .
#!/bin/bash
#
# $Id$
#
# DESCRIPTION: build object-logic or run examples
## diagnostics
PRG=$(basename $0)
function usage()
{
echo
echo "Usage: $PRG LOGIC NAME"
echo
echo " Options are:"
echo " -b build mode (output heap image, use dir \".\")"
echo " -i BOOL generate theory browsing information,"
echo " i.e. HTML / graph data (default false)"
echo " -s NAME override session NAME"
echo
echo " Build object-logic or run examples. Also creates browsing"
echo " information (HTML etc.) according to settings."
echo
exit 1
}
## process command line
# options
BUILD=""
INFO=false
SESSION=""
function getoptions()
{
OPTIND=1
while getopts "bi:s:" OPT
do
case "$OPT" in
b)
BUILD=true
;;
i)
INFO="$OPTARG"
;;
s)
SESSION="$OPTARG"
;;
\?)
usage
;;
esac
done
}
getoptions $ISABELLE_USEDIR_OPTIONS
getoptions "$@"
shift $(($OPTIND - 1))
# args
[ $# -ne 2 ] && usage
LOGIC="$1"; shift
NAME="$1"; shift
# prepare directories for html and graph output
if [ $INFO = "true" -a ! -d $ISABELLE_BROWSER_INFO ]; then
mkdir -p $ISABELLE_BROWSER_INFO/gif
cp $ISABELLE_HOME/lib/images/*.gif $ISABELLE_BROWSER_INFO/gif
cp $ISABELLE_HOME/lib/html/index1.html $ISABELLE_BROWSER_INFO/index.html
mkdir -p $ISABELLE_BROWSER_INFO/graph
cp $ISABELLE_HOME/lib/html/index2.html $ISABELLE_BROWSER_INFO/graph/index.html
mkdir $ISABELLE_BROWSER_INFO/graph/GraphBrowser
mkdir $ISABELLE_BROWSER_INFO/graph/awtUtilities
cp $ISABELLE_HOME/lib/browser/G*/*.class $ISABELLE_BROWSER_INFO/graph/G*
cp $ISABELLE_HOME/lib/browser/a*/*.class $ISABELLE_BROWSER_INFO/graph/a*
fi
## main
[ -z "$SESSION" ] && SESSION=$(basename $NAME)
if [ -n "$BUILD" ]; then
exec $ISABELLE \
-e "make_html := $INFO; make_graph := $INFO; output_dir := \"$ISABELLE_BROWSER_INFO\"; home_path := \"$HOME\"; set_session\"$SESSION\"; exit_use_dir\".\"; make_html := false; make_graph := false;" \
-q -w $LOGIC $NAME
else
exec $ISABELLE \
-e "make_html := $INFO; make_graph := $INFO; output_dir := \"$ISABELLE_BROWSER_INFO\"; home_path := \"$HOME\"; set_session\"$SESSION\"; exit_use_dir\"$NAME\"; make_html := false; make_graph := false; quit();" \
-r -q $LOGIC
fi