mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-07-16 02:02:58 -07:00
Make auto update more forgiving
plexupdate.sh should not fail because autoupdate cannot proceed.
This commit is contained in:
parent
6093805856
commit
9b0ec5de9d
1 changed files with 38 additions and 42 deletions
|
@ -340,15 +340,10 @@ if [ "${AUTOUPDATE}" = "yes" ]; then
|
|||
pushd "$(dirname "$0")" >/dev/null
|
||||
|
||||
if [ ! -d .git ]; then
|
||||
error "This is not a git repository. Auto-update only works if you've done a git clone"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! git diff --quiet; then
|
||||
error "You have made changes to the plexupdate files, cannot auto update"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
warn "This is not a git repository. Auto-update only works if you've done a git clone"
|
||||
elif ! git diff --quiet; then
|
||||
warn "You have made changes to the plexupdate files, cannot auto update"
|
||||
else
|
||||
# Force FETCH_HEAD to point to the correct branch (for older versions of git which don't default to current branch)
|
||||
if git fetch origin $BRANCHNAME --quiet && ! git diff --quiet FETCH_HEAD; then
|
||||
info "Auto-updating..."
|
||||
|
@ -391,6 +386,7 @@ if [ "${AUTOUPDATE}" = "yes" ]; then
|
|||
exit $?
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#we may have already returned, so ignore any errors as well
|
||||
popd &>/dev/null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue