diff options
| author | tslil <tslil@posteo.de> | 2026-09-10 09:35:06 +0100 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-09-10 09:36:22 +0100 |
| commit | 30e3fd068433ee1f6feb28b524efce09a33e6f7e (patch) | |
| tree | 9cd05ac5e024f2b707bfe1e0ac69d89480de46d6 | |
| parent | c3f238acb1b49cb6782693a7781d325a6090d1ad (diff) | |
sand: accept command as second argument
| -rwxr-xr-x | sand | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -5,6 +5,11 @@ if [ -z "$1" ]; then exit 1 fi; +cmd="bash" +if [ -n "$2" ]; then + cmd="$2" +fi; + bwrap \ --ro-bind /usr /usr \ --ro-bind /lib /lib \ @@ -31,7 +36,7 @@ bwrap \ --setenv USER $(whoami) \ --setenv SHELL /bin/bash \ --setenv TERM foot \ - --setenv PATH /home/$(whoami)/.local/bin:/home/$(whoami)/.local/share/npm/bin::/usr/local/sbin:/usr/local/bin:/usr/bin \ + --setenv PATH /home/$(whoami)/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin \ --bind "$1" /home/$(whoami)/project/ \ --chdir /home/$(whoami)/project/ \ - bash + $cmd |
