aboutsummaryrefslogtreecommitdiff
path: root/env
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-03-04 01:50:46 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-03-06 11:37:32 +0100
commit1cc4d947524b4780f0055e62e152083982bbf186 (patch)
tree31f4667b8a0eb7a77563df1fe98460a5d6774613 /env
parentTests now use our local compiled files. (diff)
downloadcalp-1cc4d947524b4780f0055e62e152083982bbf186.tar.gz
calp-1cc4d947524b4780f0055e62e152083982bbf186.tar.xz
Allow explicit GUILE environment, document it.
The environment variable GUILE can now be set to override the guile version, which allows us to test the code with multiple versions/implementations. Also updates README to note these variables.
Diffstat (limited to 'env')
-rwxr-xr-xenv17
1 files changed, 10 insertions, 7 deletions
diff --git a/env b/env
index 99b3f84d..cc4fc222 100755
--- a/env
+++ b/env
@@ -1,15 +1,18 @@
# -*- mode: sh -*-
-root=$(dirname $(realpath $BASH_SOURCE))
+_here=$(dirname "$(realpath "${BASH_SOURCE[0]}")")
-GUILE_LOAD_PATH="$root/module:$GUILE_LOAD_PATH"
-#GUILE_LOAD_COMPILED_PATH="$root/obj/module:$GUILE_LOAD_COMPILED_PATH"
-#LD_LIBRARY_PATH="$root/lib:$LD_LIBRARY_PATH"
+export GUILE=${GUILE:-guile}
+guile_version=$($GUILE -c '(display (version))')
-XDG_DATA_HOME=$root
-LIBEXEC=$root/scripts/
+export GUILE_LOAD_COMPILED_PATH=${_here}/obj-${guile_version}:${GUILE_LOAD_COMPILED_PATH}
+export GUILE_LOAD_PATH=${_here}/module:${GUILE_LOAD_PATH}
+export GUILE_AUTO_COMPILE=0
+
+# TODO why are these set?
+export XDG_DATA_HOME=$_here
+export LIBEXEC=${_here}/scripts/
-export GUILE_LOAD_PATH GUILE_LOAD_COMPILED_PATH LD_LIBRARY_PATH XDG_DATA_HOME LIBEXEC
#export GUILE_AUTO_COMPILE=0
# exec "$@"