mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-07-31 12:00:07 -07:00
Stay on current branch unless BRANCHNAME is set
This commit is contained in:
parent
306edf9d0d
commit
6a882a8ad3
1 changed files with 3 additions and 2 deletions
|
@ -228,8 +228,9 @@ if [ "${AUTOUPDATE}" = "yes" ]; then
|
||||||
elif ! git diff --quiet; then
|
elif ! git diff --quiet; then
|
||||||
warn "You have made changes to the plexupdate files, cannot auto update"
|
warn "You have made changes to the plexupdate files, cannot auto update"
|
||||||
else
|
else
|
||||||
BRANCHNAME="${BRANCHNAME:-master}"
|
if [ -z "${BRANCHNAME}" ]; then
|
||||||
if [ "${BRANCHNAME}" != "$(git symbolic-ref -q --short HEAD)" ]; then
|
BRANCHNAME="$(git symbolic-ref -q --short HEAD)"
|
||||||
|
elif [ "${BRANCHNAME}" != "$(git symbolic-ref -q --short HEAD)" ]; then
|
||||||
git checkout "${BRANCHNAME}"
|
git checkout "${BRANCHNAME}"
|
||||||
fi
|
fi
|
||||||
# Force FETCH_HEAD to point to the correct branch (for older versions of git which don't default to current branch)
|
# Force FETCH_HEAD to point to the correct branch (for older versions of git which don't default to current branch)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue