summaryrefslogtreecommitdiff
path: root/Biz/Ide/repl
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-08-08 10:01:32 -0400
committerBen Sima <ben@bsima.me>2022-08-08 10:01:32 -0400
commitcd6f38a2e8d5b2f4198831aae0a37c568c69c2ae (patch)
tree8546248171260064e3d8e352a1a0de46707353b4 /Biz/Ide/repl
parente9d639f7d6f21498c450db36d46e1e6ac6c0b17e (diff)
Ensure BIZ_ROOT is set in shell scripts
Diffstat (limited to 'Biz/Ide/repl')
-rwxr-xr-xBiz/Ide/repl6
1 files changed, 3 insertions, 3 deletions
diff --git a/Biz/Ide/repl b/Biz/Ide/repl
index 8f92fba..c6259e1 100755
--- a/Biz/Ide/repl
+++ b/Biz/Ide/repl
@@ -29,7 +29,7 @@ fi
langdeps=$(jq --raw-output '.[].langdeps | join(" ")' <<< $json)
sysdeps=$(jq --raw-output '.[].sysdeps | join(" ")' <<< $json)
exts=$(jq --raw-output '.[].namespace.ext' <<< $json | sort | uniq)
- BILD="(import $BIZ_ROOT/Biz/Bild.nix {})"
+ BILD="(import ${BIZ_ROOT:?}/Biz/Bild.nix {})"
for lib in ${sysdeps[@]}; do
flags+=(--packages "$BILD.private.nixpkgs.${lib}")
flags+=(--packages "$BILD.private.nixpkgs.pkg-config")
@@ -44,14 +44,14 @@ fi
echo "warn: repl: ghci does not support binding to a port"
fi
flags+=(--packages "$BILD.private.ghcWith (h: with h; [$langdeps])")
- command=${CMD:-"ghci -i$BIZ_ROOT -ghci-script $BIZ_ROOT/.ghci ${targets[@]}"}
+ command=${CMD:-"ghci -i${BIZ_ROOT:?} -ghci-script ${BIZ_ROOT:?}/.ghci ${targets[@]}"}
;;
Scm)
for lib in ${langdeps[@]}; do
flags+=(--packages "$BILD.private.nixpkgs.guile-${lib}")
done
flags+=(--packages "$BILD.private.nixpkgs.guile_3_0")
- command=${CMD:-"guile -L $BIZ_ROOT -C $BIZ_ROOT/_/int --r7rs --listen=${PORT:-37146}"}
+ command=${CMD:-"guile -L ${BIZ_ROOT:?} -C ${BIZ_ROOT:?}/_/int --r7rs --listen=${PORT:-37146}"}
;;
Lisp)
flags+=(--packages "$BILD.private.sbclWith (p: with p; [asdf swank $langdeps])")