mirror of
https://github.com/dokku/dokku.git
synced 2026-02-24 04:00:36 +01:00
21 lines
370 B
Bash
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 "$@"
|