From cd6f38a2e8d5b2f4198831aae0a37c568c69c2ae Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 8 Aug 2022 10:01:32 -0400 Subject: Ensure BIZ_ROOT is set in shell scripts --- Biz/Ide/repl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Biz/Ide/repl') 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])") -- cgit v1.2.3