mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 02:48:38 -04:00
Disambiguate 'git checkout release' in install.sh
The tracked release/ directory collides with the release branch name, so a
bare `git checkout release` is ambiguous ("could be both a local file and a
tracking branch") and aborts a fresh install. Use `checkout -B <branch>
origin/<branch>`, which can never be parsed as a path.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cafc6514cb
commit
bf88ac9f33
1 changed files with 3 additions and 1 deletions
|
|
@ -56,7 +56,9 @@ set -e
|
|||
apt install -y git
|
||||
git --version
|
||||
git clone https://github.com/lrnselfreliance/wrolpi.git /opt/wrolpi || :
|
||||
(cd /opt/wrolpi && git fetch && git checkout "${BRANCH}" && git reset --hard origin/"${BRANCH}") || exit 4
|
||||
# Use `checkout -B <branch> origin/<branch>` so the ref can never be mistaken for a path. A tracked `release/`
|
||||
# directory otherwise collides with the `release` branch name, making a bare `git checkout release` ambiguous.
|
||||
(cd /opt/wrolpi && git fetch && git checkout -B "${BRANCH}" "origin/${BRANCH}" && git reset --hard origin/"${BRANCH}") || exit 4
|
||||
|
||||
if [ ${rpi} == true ]; then
|
||||
/opt/wrolpi/scripts/install_raspberrypios.sh 2>&1 | tee /opt/wrolpi/install.log
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue