19 lines
522 B
Bash
Executable File
19 lines
522 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
SELF_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
. "$SELF_DIR/common.sh"
|
|
|
|
MODULE_DIR=${1:-}
|
|
ENV_FILE=${2:-}
|
|
PHASE=${3:-}
|
|
[ -n "$MODULE_DIR" ] || fail "Usage: run_entry.sh <module-dir> <env-file> <phase>"
|
|
[ -n "$ENV_FILE" ] || fail "Usage: run_entry.sh <module-dir> <env-file> <phase>"
|
|
[ -n "$PHASE" ] || fail "Usage: run_entry.sh <module-dir> <env-file> <phase>"
|
|
|
|
require_dir "$MODULE_DIR"
|
|
load_env_file "$ENV_FILE"
|
|
require_file "$MODULE_DIR/entry.sh"
|
|
|
|
exec /bin/sh "$MODULE_DIR/entry.sh" "$PHASE"
|