more sandbox config
This commit is contained in:
parent
0f1a81c2aa
commit
6447486643
6 changed files with 533 additions and 90 deletions
12
executables/opencode.sh
Normal file
12
executables/opencode.sh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SSH_TARGET="sandbox@vsock%3"
|
||||
|
||||
if [[ "$PWD" == /home/user* ]]; then
|
||||
project="${PWD/\/home\/user/\/home\/sandbox}"
|
||||
else
|
||||
project="$(ssh "$SSH_TARGET" 'mktemp -d -p /tmp opencode-XXXXXX')"
|
||||
fi
|
||||
|
||||
exec ssh -t "$SSH_TARGET" opencode "$project" "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue