Подготовить HY2XS к production-сборке
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
PACKAGE_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
||||
ORCHESTRATOR="$PACKAGE_DIR/orchestrator/hy2xs-orchestrator"
|
||||
|
||||
log() {
|
||||
printf '[hy2xs-install] %s\n' "$*"
|
||||
}
|
||||
|
||||
fail() {
|
||||
printf '[hy2xs-install] ERROR: %s\n' "$*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
fail "HY2XS install must run as root."
|
||||
fi
|
||||
|
||||
if [ ! -x "$ORCHESTRATOR" ]; then
|
||||
fail "Missing executable orchestrator artifact: $ORCHESTRATOR"
|
||||
fi
|
||||
|
||||
log "package directory: $PACKAGE_DIR"
|
||||
log "starting install-only orchestrator"
|
||||
exec "$ORCHESTRATOR" install --package-dir "$PACKAGE_DIR" "$@"
|
||||
Reference in New Issue
Block a user