-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·57 lines (47 loc) · 1.62 KB
/
install.sh
File metadata and controls
executable file
·57 lines (47 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
HELPER="${ROOT_DIR}/tools/install/delegate-to-pcw.sh"
BANNER_FILE="${ROOT_DIR}/tools/banner.txt"
print_banner() {
if [[ -f "${BANNER_FILE}" ]]; then
cat "${BANNER_FILE}"
echo
fi
}
usage() {
cat <<'EOF'
PyPNM-WebUI Wrapper Installer
This repository is a wrapper that delegates installation to the unified
PyPNM-CMTS-WebUI repository.
Usage:
./install.sh [options] [-- <extra-pcw-install-args>]
Options:
--with-pypnm-webui Install unified repo in PW compatibility profile.
(Default when no profile flag is provided.)
--with-pypnm-cmts-webui Install unified repo in PCW profile.
--pcw-dir <path> Existing or target checkout directory for
PyPNM-CMTS-WebUI.
(Default: ../PyPNM-CMTS-WebUI)
--pcw-repo <url> Git URL used when cloning unified repo.
--pcw-ref <ref> Optional branch/tag/SHA to checkout in unified repo.
--no-pull Do not pull latest changes when unified repo exists.
-h, --help Show this help.
Examples:
./install.sh
./install.sh --with-pypnm-webui
./install.sh --with-pypnm-cmts-webui
./install.sh --pcw-dir ../PyPNM-CMTS-WebUI --with-pypnm-webui
./install.sh --with-pypnm-webui -- --with-pypnm-docsis
EOF
}
if [[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
usage
exit 0
fi
if [[ ! -x "${HELPER}" ]]; then
echo "[install][error] Missing helper script: ${HELPER}" >&2
exit 1
fi
print_banner
exec "${HELPER}" --root-dir "${ROOT_DIR}" "$@"