@@ -14,7 +14,12 @@ set -euo pipefail |
14 | 14 | INSTALL_DIR="${HOME}/.local/bin" |
15 | 15 | CONFIG_DIR="${HOME}/.lpb-stack/devstack" |
16 | 16 | CONFIG_FILE="${CONFIG_DIR}/config" |
17 | | -SCRIPT_URL="https://raw.githubusercontent.com/lpb-stack/devstack/main/scripts/lpb" |
| 17 | +# Source branch: main by default. Set LPB_BRANCH=dev to install the dev |
| 18 | +# pipeline code (e.g. the unified setup wizard) so the launcher matches |
| 19 | +# *-dev images: LPB_BRANCH=dev bash install.sh |
| 20 | +OWNER_REPO="lpb-stack/devstack" |
| 21 | +BRANCH="${LPB_BRANCH:-main}" |
| 22 | +SCRIPT_URL="https://raw.githubusercontent.com/${OWNER_REPO}/${BRANCH}/scripts/lpb" |
18 | 23 |
|
19 | 24 | # 1. Validate prerequisites |
20 | 25 | for dep in curl; do |
@@ -31,29 +36,28 @@ echo "Installing lpb..." |
31 | 36 | curl -fsSL "${SCRIPT_URL}" -o "${INSTALL_DIR}/lpb" |
32 | 37 | chmod +x "${INSTALL_DIR}/lpb" |
33 | 38 | # The shell wrapper execs lpb.py from the same directory. |
34 | | -OWNER_REPO="lpb-stack/devstack" |
35 | | -curl -fsSL "https://raw.githubusercontent.com/${OWNER_REPO}/main/scripts/lpb.py" -o "${INSTALL_DIR}/lpb.py" |
| 39 | +curl -fsSL "https://raw.githubusercontent.com/${OWNER_REPO}/${BRANCH}/scripts/lpb.py" -o "${INSTALL_DIR}/lpb.py" |
36 | 40 | chmod +x "${INSTALL_DIR}/lpb.py" |
37 | 41 | # Install the canonical env defaults alongside so a plain install picks up |
38 | 42 | # stack/repo defaults (a fork's lpb.py loads these via CONFIG_DIR fallback). |
39 | | -curl -fsSL "https://raw.githubusercontent.com/${OWNER_REPO}/main/lpb.stack.env" -o "${CONFIG_DIR}/lpb.stack.env" |
40 | | -curl -fsSL "https://raw.githubusercontent.com/${OWNER_REPO}/main/lpb.conf.env" -o "${CONFIG_DIR}/lpb.conf.env" |
| 43 | +curl -fsSL "https://raw.githubusercontent.com/${OWNER_REPO}/${BRANCH}/lpb.stack.env" -o "${CONFIG_DIR}/lpb.stack.env" |
| 44 | +curl -fsSL "https://raw.githubusercontent.com/${OWNER_REPO}/${BRANCH}/lpb.conf.env" -o "${CONFIG_DIR}/lpb.conf.env" |
41 | 45 | # Installed VERSION file (source for `lpb --version`; refreshed by self-update) |
42 | | -curl -fsSL "https://raw.githubusercontent.com/${OWNER_REPO}/main/VERSION" -o "${CONFIG_DIR}/VERSION" |
| 46 | +curl -fsSL "https://raw.githubusercontent.com/${OWNER_REPO}/${BRANCH}/VERSION" -o "${CONFIG_DIR}/VERSION" |
43 | 47 |
|
44 | 48 | # 3b. Stack tools (config repo manager + devstack DevOps tool) and the shared |
45 | 49 | # localpibox package they import (resolved via ~/.lpb-stack/devstack/). |
46 | 50 | echo "Installing lpb-config + lpb-devstack..." |
47 | 51 | for tool in lpb-config lpb-devstack; do |
48 | | - curl -fsSL "https://raw.githubusercontent.com/${OWNER_REPO}/main/scripts/${tool}" -o "${INSTALL_DIR}/${tool}" |
| 52 | + curl -fsSL "https://raw.githubusercontent.com/${OWNER_REPO}/${BRANCH}/scripts/${tool}" -o "${INSTALL_DIR}/${tool}" |
49 | 53 | chmod +x "${INSTALL_DIR}/${tool}" |
50 | 54 | done |
51 | 55 | mkdir -p "${CONFIG_DIR}/localpibox/stack" |
52 | 56 | for f in __init__.py cli.py env.py log.py run.py setup.py; do |
53 | | - curl -fsSL "https://raw.githubusercontent.com/${OWNER_REPO}/main/scripts/localpibox/${f}" -o "${CONFIG_DIR}/localpibox/${f}" |
| 57 | + curl -fsSL "https://raw.githubusercontent.com/${OWNER_REPO}/${BRANCH}/scripts/localpibox/${f}" -o "${CONFIG_DIR}/localpibox/${f}" |
54 | 58 | done |
55 | 59 | for f in __init__.py gitutil.py repos.py version.py workspace.py validate.py release.py; do |
56 | | - curl -fsSL "https://raw.githubusercontent.com/${OWNER_REPO}/main/scripts/localpibox/stack/${f}" -o "${CONFIG_DIR}/localpibox/stack/${f}" |
| 60 | + curl -fsSL "https://raw.githubusercontent.com/${OWNER_REPO}/${BRANCH}/scripts/localpibox/stack/${f}" -o "${CONFIG_DIR}/localpibox/stack/${f}" |
57 | 61 | done |
58 | 62 |
|
59 | 63 | # 4. Add to PATH if needed (warn only, don't modify shell configs) |
|