Files
dokku/docker/usr/local/bin/railpack
2025-11-09 20:21:09 -05:00

21 lines
370 B
Bash

#!/usr/bin/env bash
set -eo pipefail
[[ $TRACE ]] && set -x
main() {
declare desc="re-runs railpack commands as sudo"
local RAILPACK_BIN=""
if [[ -x "/usr/bin/railpack" ]]; then
RAILPACK_BIN="/usr/bin/railpack"
fi
if [[ -z "$RAILPACK_BIN" ]]; then
echo "! No railpack binary found" 1>&2
exit 1
fi
sudo -E "$RAILPACK_BIN" "$@"
}
main "$@"