flatten 20260225

This commit is contained in:
Timothy Prepscius
2026-02-25 12:39:24 -05:00
commit fa54be052a
315 changed files with 49791 additions and 0 deletions

38
tjp/core/compression/remote-run Executable file
View File

@@ -0,0 +1,38 @@
#!/usr/bin/env bash
set -euo pipefail
usage() {
cat <<'EOF'
Usage:
./remote-run <command>
Environment variables:
REMOTE_HOST Default: host.docker.internal
REMOTE_PORT Default: 6666
REMOTE_TOKEN Optional shared token
EOF
}
if [[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
usage
exit 0
fi
if [[ $# -lt 1 ]]; then
usage
exit 2
fi
cmd="$1"
host="${REMOTE_HOST:-host.docker.internal}"
port="${REMOTE_PORT:-6666}"
token="${REMOTE_TOKEN:-}"
url="http://${host}:${port}/run/${cmd}"
curl_args=(--silent --show-error --no-buffer "$url")
if [[ -n "$token" ]]; then
curl_args=(-H "X-Remote-Token: ${token}" "${curl_args[@]}")
fi
exec curl "${curl_args[@]}"