mirror of
https://github.com/dokku/dokku.git
synced 2026-02-24 20:19:52 +01:00
21 lines
418 B
Bash
21 lines
418 B
Bash
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
[[ $TRACE ]] && set -x
|
|
|
|
main() {
|
|
declare desc="re-runs lambda-builder commands as sudo"
|
|
local LAMBDA_BUILDER_BIN=""
|
|
if [[ -x "/usr/bin/lambda-builder" ]]; then
|
|
LAMBDA_BUILDER_BIN="/usr/bin/lambda-builder"
|
|
fi
|
|
|
|
if [[ -z "$LAMBDA_BUILDER_BIN" ]]; then
|
|
echo "! No lambda-builder binary found" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
sudo -E "$LAMBDA_BUILDER_BIN" "$@"
|
|
}
|
|
|
|
main "$@"
|