Support optional Ubuntu system bootstrap
This commit is contained in:
@@ -7,10 +7,11 @@ REPO="${REPO:-git@git.n.xiaomi.com:wuyang6/zk-data-agent.git}"
|
||||
BRANCH="${BRANCH:-main}"
|
||||
APP_DIR="${APP_DIR:-${HOME}/zk-data-agent}"
|
||||
FORCE=0
|
||||
BOOTSTRAP_SYSTEM="${BOOTSTRAP_SYSTEM:-0}"
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage: bash install-from-git.sh [--repo REPO] [--branch BRANCH] [--dir APP_DIR] [--force]
|
||||
Usage: bash install-from-git.sh [--repo REPO] [--branch BRANCH] [--dir APP_DIR] [--force] [--bootstrap-system]
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -32,6 +33,10 @@ while [[ $# -gt 0 ]]; do
|
||||
FORCE=1
|
||||
shift
|
||||
;;
|
||||
--bootstrap-system)
|
||||
BOOTSTRAP_SYSTEM=1
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
usage
|
||||
exit 0
|
||||
@@ -63,4 +68,8 @@ else
|
||||
cd "${APP_DIR}"
|
||||
fi
|
||||
|
||||
bash scripts/deploy-ubuntu.sh "${BRANCH}" --skip-git
|
||||
deploy_args=("${BRANCH}" "--skip-git")
|
||||
if [[ "${BOOTSTRAP_SYSTEM}" == "1" ]]; then
|
||||
deploy_args+=("--bootstrap-system")
|
||||
fi
|
||||
bash scripts/deploy-ubuntu.sh "${deploy_args[@]}"
|
||||
|
||||
Reference in New Issue
Block a user