summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsand (renamed from soc)9
1 files changed, 7 insertions, 2 deletions
diff --git a/soc b/sand
index 5b574a5..1af0423 100755
--- a/soc
+++ b/sand
@@ -1,5 +1,10 @@
#!/usr/bin/env sh
+if [ -z "$1" ]; then
+ echo "Must provide a project directory to mount"
+ exit 1
+fi;
+
bwrap \
--ro-bind /usr /usr \
--ro-bind /lib /lib \
@@ -20,7 +25,6 @@ bwrap \
--bind ~/.cache/uv /home/$(whoami)/.cache/uv \
--bind ~/.cache/huggingface /home/$(whoami)/.cache/huggingface \
--bind ~/.cache/opencode /home/$(whoami)/.cache/opencode \
- --bind ~/code/workspace /home/$(whoami)/project \
--bind ~/.local/bin/vibe /home/$(whoami)/.local/bin/vibe \
--bind ~/.cargo /home/$(whoami)/.cargo \
--bind ~/.rustup /home/$(whoami)/.rustup \
@@ -29,5 +33,6 @@ bwrap \
--setenv USER $(whoami) \
--setenv SHELL /bin/bash \
--setenv PATH /home/$(whoami)/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin \
- --chdir /home/$(whoami)/project \
+ --bind "$1" /home/$(whoami)/project/ \
+ --chdir /home/$(whoami)/project/ \
bash