Skip to content

Commit

Permalink
gap.sh should respect the GAP_DIR environment var
Browse files Browse the repository at this point in the history
In previous versions of GAP, if the GAP_DIR environment variable was set, then GAP used this variable to determine the location of GAP.  (Otherwise, it uses sensible defaults.)  This patch returns to this behavior.
  • Loading branch information
RussWoodroofe authored and fingolfin committed Jun 15, 2018
1 parent 28592e8 commit 20dd8f1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cnf/compat/gap.sh.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/sh

GAPDIR=$(cd "@abs_top_srcdir@" && pwd)
exec "@abs_top_builddir@/gap" -l "$GAPDIR" "$@"
GAP_EXE=$GAP_DIR
if [ "x$GAP_DIR" = "x" ]; then
GAP_DIR=$(cd "@abs_top_srcdir@" && pwd)
GAP_EXE=@abs_top_builddir@
fi

exec "$GAP_EXE/gap" -l "$GAP_DIR" "$@"

0 comments on commit 20dd8f1

Please sign in to comment.