mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-04-25 03:38:26 +02:00
31 lines
504 B
Bash
Executable File
31 lines
504 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
cd "$(dirname "$0")"
|
|
|
|
|
|
if [[ -z $1 || $1 = -* ]]; then
|
|
set -- up "$@"
|
|
fi
|
|
|
|
function with_set_x() {
|
|
set -x
|
|
"$@"
|
|
{ ec=$?; set +x;return $ec; } 2>/dev/null
|
|
}
|
|
|
|
function build() {
|
|
# podman build -t ghcr.io/sshuttle/sshuttle-testbed .
|
|
with_set_x docker build -t ghcr.io/sshuttle/sshuttle-testbed -f Containerfile .
|
|
}
|
|
|
|
function compose() {
|
|
# podman-compose "$@"
|
|
with_set_x docker compose "$@"
|
|
}
|
|
|
|
|
|
if [[ $* = *--build* ]]; then
|
|
build
|
|
fi
|
|
compose "$@"
|