aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-09-10 20:50:58 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-09-11 19:58:54 +0200
commit7818e2fd35f241268a59bfaf87952d1cd3d1042c (patch)
treeb44d1d45323942ce6b55666ed03e818e7fc6e852
parentAdd emacs .dir-locals.el (diff)
downloadcalp-7818e2fd35f241268a59bfaf87952d1cd3d1042c.tar.gz
calp-7818e2fd35f241268a59bfaf87952d1cd3d1042c.tar.xz
Add direnv .envrc file.
Direnv <https://github.com/direnv/direnv/> is a setting environment variables based on PWD.
-rw-r--r--.envrc17
1 files changed, 17 insertions, 0 deletions
diff --git a/.envrc b/.envrc
new file mode 100644
index 00000000..0fccc035
--- /dev/null
+++ b/.envrc
@@ -0,0 +1,17 @@
+guile_version=$(guile -c '(display (version))')
+
+if [ "${GUILE_LOAD_PATH:-no}" = "no" ]; then
+ export GUILE_LOAD_PATH="$PWD/module"
+else
+ export GUILE_LOAD_PATH="$PWD/module:$GUILE_LOAD_PATH"
+fi
+
+if [ "${GUILE_LOAD_COMPILED_PATH:-no}" = "no" ]; then
+ export GUILE_LOAD_COMPILED_PATH="$PWD/obj-${guile_version}"
+else
+ export GUILE_LOAD_COMPILED_PATH="$PWD/obj-${guile_version}:$GUILE_LOAD_COMPILED_PATH"
+fi
+unset guile_version
+
+export PATH="$PWD/static/node_modules/.bin:$PATH"
+export PATH="$PWD/scripts/:$PATH"