mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-19 21:03:19 -07:00
Merge branch 'master' into keepreverted
This commit is contained in:
commit
512b75b7e5
2 changed files with 4 additions and 21 deletions
|
@ -11,7 +11,7 @@
|
||||||
# Current pages we need - Do not change unless Plex.tv changes again
|
# Current pages we need - Do not change unless Plex.tv changes again
|
||||||
URL_LOGIN='https://plex.tv/users/sign_in.json'
|
URL_LOGIN='https://plex.tv/users/sign_in.json'
|
||||||
URL_DOWNLOAD='https://plex.tv/api/downloads/5.json?channel=plexpass'
|
URL_DOWNLOAD='https://plex.tv/api/downloads/5.json?channel=plexpass'
|
||||||
URL_DOWNLOAD_PUBLIC='https://plex.tv/api/downloads/1.json'
|
URL_DOWNLOAD_PUBLIC='https://plex.tv/api/downloads/5.json'
|
||||||
|
|
||||||
# Default options for package managers, override if needed
|
# Default options for package managers, override if needed
|
||||||
REDHAT_INSTALL="dnf -y install"
|
REDHAT_INSTALL="dnf -y install"
|
||||||
|
|
|
@ -54,6 +54,7 @@ AUTOUPDATE=no
|
||||||
AUTOSTART=no
|
AUTOSTART=no
|
||||||
KEEPREVERTED=no
|
KEEPREVERTED=no
|
||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
|
BUILD="linux-$ARCH"
|
||||||
SHOWPROGRESS=no
|
SHOWPROGRESS=no
|
||||||
WGETOPTIONS="" # extra options for wget. Used for progress bar.
|
WGETOPTIONS="" # extra options for wget. Used for progress bar.
|
||||||
CHECKUPDATE=yes
|
CHECKUPDATE=yes
|
||||||
|
@ -301,15 +302,10 @@ if [ ! -d "${DOWNLOADDIR}" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${DISTRO_INSTALL}" ]; then
|
if [ -z "${DISTRO_INSTALL}" ]; then
|
||||||
if [ -z "${DISTRO}" -a -z "${BUILD}" ]; then
|
if [ -z "${DISTRO}" ]; then
|
||||||
# Detect if we're running on redhat instead of ubuntu
|
# Detect if we're running on redhat instead of ubuntu
|
||||||
if [ -f /etc/redhat-release ]; then
|
if [ -f /etc/redhat-release ]; then
|
||||||
REDHAT=yes
|
REDHAT=yes
|
||||||
if [ "${PUBLIC}" = "yes" ]; then
|
|
||||||
BUILD="linux-ubuntu-${ARCH}"
|
|
||||||
else
|
|
||||||
BUILD="linux-${ARCH}"
|
|
||||||
fi
|
|
||||||
DISTRO="redhat"
|
DISTRO="redhat"
|
||||||
if ! hash dnf 2>/dev/null; then
|
if ! hash dnf 2>/dev/null; then
|
||||||
DISTRO_INSTALL="${REDHAT_INSTALL/dnf/yum}"
|
DISTRO_INSTALL="${REDHAT_INSTALL/dnf/yum}"
|
||||||
|
@ -318,18 +314,9 @@ if [ -z "${DISTRO_INSTALL}" ]; then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
REDHAT=no
|
REDHAT=no
|
||||||
if [ "${PUBLIC}" = yes ]; then
|
DISTRO="debian"
|
||||||
BUILD="linux-ubuntu-${ARCH}"
|
|
||||||
DISTRO="ubuntu"
|
|
||||||
else
|
|
||||||
BUILD="linux-${ARCH}"
|
|
||||||
DISTRO="debian"
|
|
||||||
fi
|
|
||||||
DISTRO_INSTALL="${DEBIAN_INSTALL}"
|
DISTRO_INSTALL="${DEBIAN_INSTALL}"
|
||||||
fi
|
fi
|
||||||
elif [ -z "${DISTRO}" -o -z "${BUILD}" ]; then
|
|
||||||
error "You must define both DISTRO and BUILD"
|
|
||||||
exit 255
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ -z "${DISTRO}" -o -z "${BUILD}" ]; then
|
if [ -z "${DISTRO}" -o -z "${BUILD}" ]; then
|
||||||
|
@ -356,10 +343,6 @@ fi
|
||||||
if [ "${PUBLIC}" = "no" ] && ! getPlexToken; then
|
if [ "${PUBLIC}" = "no" ] && ! getPlexToken; then
|
||||||
error "Unable to get Plex token, falling back to public release"
|
error "Unable to get Plex token, falling back to public release"
|
||||||
PUBLIC="yes"
|
PUBLIC="yes"
|
||||||
BUILD="linux-ubuntu-${ARCH}"
|
|
||||||
if [ "${REDHAT}" = "yes" ]; then
|
|
||||||
DISTRO="ubuntu"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$PUBLIC" != "no" ]; then
|
if [ "$PUBLIC" != "no" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue