- Timestamp:
- 06/29/2026 11:58:19 PM (2 months ago)
- Branches:
- main
- Children:
- e954722
- Parents:
- aedc00d
- File:
-
- 1 edited
-
scripts/install.sh (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
scripts/install.sh
raedc00d rf882048 25 25 # so a self-host auto-update (klonkt-update) never pulls work-in-progress. Use `--branch main` 26 26 # for the bleeding-edge dev branch instead. 27 KLONKT_BRANCH_SET="${KLONKT_BRANCH:+1}" # channel chosen via env? (empty = no, "1" = yes) 27 28 KLONKT_BRANCH="${KLONKT_BRANCH:-stable}" 28 29 KLONKT_DIR="${KLONKT_DIR:-/opt/klonkt}" … … 35 36 NODE_FORCE="${NODE_FORCE:-}" # set to 1 to (re)install system Node anyway 36 37 PORT_EXPLICIT=0 38 BRANCH_EXPLICIT="${KLONKT_BRANCH_SET:-0}" # 1 = operator chose the channel (env or --branch) 37 39 38 40 while [ $# -gt 0 ]; do … … 40 42 --domain) KLONKT_DOMAIN="$2"; shift 2;; 41 43 --repo) KLONKT_REPO="$2"; shift 2;; 42 --branch) KLONKT_BRANCH="$2"; shift 2;;44 --branch) KLONKT_BRANCH="$2"; BRANCH_EXPLICIT=1; shift 2;; 43 45 --dir) KLONKT_DIR="$2"; shift 2;; 44 46 --port) KLONKT_PORT="$2"; PORT_EXPLICIT=1; shift 2;; … … 141 143 if [ -d "$KLONKT_DIR/.git" ]; then 142 144 git -C "$KLONKT_DIR" remote set-url origin "$KLONKT_REPO" 145 # Re-run on an EXISTING install: keep the channel this install already tracks — never 146 # silently switch it to the stable default. Only an explicit --branch / KLONKT_BRANCH 147 # overrides; a fresh install (else-branch) uses the stable default. 148 if [ "$BRANCH_EXPLICIT" != "1" ]; then 149 _cur=$(git -C "$KLONKT_DIR" rev-parse --abbrev-ref HEAD 2>/dev/null || true) 150 [ -n "$_cur" ] && [ "$_cur" != "HEAD" ] && KLONKT_BRANCH="$_cur" 151 fi 152 log "Channel: $KLONKT_BRANCH" 143 153 git -C "$KLONKT_DIR" fetch --depth 1 origin "$KLONKT_BRANCH" 144 154 # Check out FETCH_HEAD AS the target branch — not `reset --hard origin/$KLONKT_BRANCH`
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)