From 0a7f48e8cc31697212cefbb5f4a98a6456e93324 Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Fri, 16 Oct 2009 11:46:49 +0000 Subject: Patch from mattmccutchen, see http://proofgeneral.inf.ed.ac.uk/trac/ticket/297 --- bin/proofgeneral | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/proofgeneral b/bin/proofgeneral index a661adaf..00c5d620 100644 --- a/bin/proofgeneral +++ b/bin/proofgeneral @@ -74,8 +74,9 @@ do shift; done # Try to find Proof General directory if [ -z "$PGHOME" ] || [ ! -d "$PGHOME" ]; then # default relative to this script, otherwise PGHOMEDEFAULT - if [ -d ../generic ]; then - PGHOME="../generic" + MYDIR="`readlink --canonicalize "$0" | sed -ne 's,/bin/proofgeneral$,,p'`" + if [ -d "$MYDIR" ]; then + PGHOME="$MYDIR" elif [ -d "$PGHOMEDEFAULT" ]; then PGHOME="$PGHOMEDEFAULT" else -- cgit v1.2.3