summaryrefslogtreecommitdiff
path: root/sand
diff options
context:
space:
mode:
Diffstat (limited to 'sand')
-rwxr-xr-xsand12
1 files changed, 7 insertions, 5 deletions
diff --git a/sand b/sand
index 3f7ce14..f8ab8c1 100755
--- a/sand
+++ b/sand
@@ -1,13 +1,15 @@
#!/usr/bin/env sh
if [ -z "$1" ]; then
- echo "Must provide a project directory to mount"
+ echo "Must provide a programme to run"
exit 1
fi;
-cmd="bash"
+CMD="$1"
+
+PROJ_DIR="."
if [ -n "$2" ]; then
- cmd="$2";
+ PROJ_DIR="$2";
fi;
bwrap \
@@ -38,6 +40,6 @@ bwrap \
--setenv TERM foot \
--setenv KAGI_API_KEY $KAGI_API_KEY \
--setenv PATH /home/$(whoami)/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin \
- --bind "$1" /home/$(whoami)/project/ \
+ --bind "$PROJ_DIR" /home/$(whoami)/project/ \
--chdir /home/$(whoami)/project/ \
- $cmd
+ $CMD