aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Aspinall2009-10-16 11:46:49 +0000
committerDavid Aspinall2009-10-16 11:46:49 +0000
commit0a7f48e8cc31697212cefbb5f4a98a6456e93324 (patch)
tree5cc43194f49412e2e0816ed6b9f3a02a324bc643
parentdda14160ec6a89fdf965d02a95ca9a111a2f756b (diff)
Patch from mattmccutchen, see http://proofgeneral.inf.ed.ac.uk/trac/ticket/297
-rw-r--r--bin/proofgeneral5
1 files 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