mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-20 05:13:19 -07:00
Merge remote-tracking branch 'origin/master' into dsm7
This commit is contained in:
commit
ade4ddfeae
3 changed files with 15 additions and 6 deletions
|
@ -53,6 +53,8 @@ AUTODELETE=no
|
|||
AUTOUPDATE=no
|
||||
AUTOSTART=no
|
||||
ARCH=$(uname -m)
|
||||
# patch for Raspberry Pi reporting as armv7l, whereas Plex only offers armv7neon
|
||||
[ "$ARCH" = "armv7l" ] && ARCH="armv7neon"
|
||||
BUILD="linux-$ARCH"
|
||||
SHOWPROGRESS=no
|
||||
WGETOPTIONS="" # extra options for wget. Used for progress bar.
|
||||
|
@ -231,13 +233,15 @@ if [ "${AUTOUPDATE}" = "yes" ]; then
|
|||
else
|
||||
if [ -z "${BRANCHNAME}" ]; then
|
||||
BRANCHNAME="$(git symbolic-ref -q --short HEAD)"
|
||||
elif [ "${BRANCHNAME}" != "$(git symbolic-ref -q --short HEAD)" ]; then
|
||||
git checkout "${BRANCHNAME}"
|
||||
fi
|
||||
# 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..."
|
||||
|
||||
if [ "${BRANCHNAME}" != "$(git symbolic-ref -q --short HEAD)" ]; then
|
||||
git checkout "${BRANCHNAME}"
|
||||
fi
|
||||
|
||||
# Use an associative array to store permissions. If you're running bash < 4, the declare will fail and we'll
|
||||
# just run in "dumb" mode without trying to restore permissions
|
||||
declare -A FILE_OWNER FILE_PERMS && \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue