#!/bin/sh # # Simple shell script for launching Proof General. # # Uses XEmacs in preference to Emacs # # PGHOME must be set to the directory where the lisp files of # Proof General are installed. # # $Id$ # # The relative path works for uninstalled package PGHOME=/usr/share/xemacs/site-packages/lisp/ProofGeneral # Try to find an Emacs executable if [ -z "$EMACS" ] || [ ! -x "$EMACS" ]; then if which xemacs > /dev/null; then EMACS=`which xemacs` else EMACS=`which emacs` fi fi NAME=`basename $0` HELP="Usage: proofgeneral [OPTION] [FILE]... Launches Emacs Proof General, editing the proof script FILE. Options: --emacs startup Proof General with emacs (GNU Emacs) --xemacs startup Proof General with xemacs (XEmacs) --emacsbin startup Proof General with emacs binary -h, --help show this help and exit -v, --version output version information and exit Examples: $NAME Example.thy Load Proof General editing Isar file Example.thy $NAME example.v Load Proof General editing Coq file Example.v For documentation and latest versions, visit http://proofgeneral.inf.ed.ac.uk. Report bugs to ." # VERSIONBLURB='David Aspinall. Copyright (C) 1998-2004 LFCS, University of Edinburgh, UK. This is free software; see the source for copying conditions.' while case $1 in -h) echo "$HELP" exit 0;; --help) echo "$HELP" exit 0;; -v) VERSION=`grep proof-general-version $PGHOME/generic/proof-site.el | sed -e 's/.*Version //g' | sed -e 's/\. .*//g'` echo "$NAME" "($VERSION)" echo "$VERSIONBLURB" exit 0;; --version) VERSION=`grep proof-general-version $PGHOME/generic/proof-site.el | sed -e 's/.*Version //g' | sed -e 's/\. .*//g'` echo "$NAME" "($VERSION)" echo "$VERSIONBLURB" exit 0;; --emacs) EMACS=`which emacs`;; --xemacs) EMACS=`which xemacs`;; --emacsbin) EMACS=$2 shift;; -*) echo "$NAME: option $1 not recognized. Use $NAME --help for help." 1>&2 exit 1;; *) break;; esac do shift; done if [ ! -x "$EMACS" ]; then echo "$NAME: cannot find an Emacs or XEmacs executable. Set EMACS or your PATH." 1>&2 exit 1 fi exec $EMACS -eval "(or (featurep (quote proof-site)) (load \"$PGHOME/generic/proof-site.el\"))" -f proof-splash-display-screen "$@"