mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-19 04:49:34 -07:00
Provide alternate reinstall command for FORCE
This commit is contained in:
parent
fab9d423c8
commit
09970a86ad
2 changed files with 11 additions and 8 deletions
|
@ -175,19 +175,24 @@ getLocalSHA() {
|
||||||
check_distro() {
|
check_distro() {
|
||||||
if hash dnf 2>/dev/null; then
|
if hash dnf 2>/dev/null; then
|
||||||
DISTRO=redhat
|
DISTRO=redhat
|
||||||
DISTRO_INSTALL="dnf -y"
|
DISTRO_INSTALL="dnf -y install"
|
||||||
|
DISTRO_REINSTALL="dnf -y reinstall"
|
||||||
elif hash yum 2>/dev/null; then
|
elif hash yum 2>/dev/null; then
|
||||||
DISTRO=redhat
|
DISTRO=redhat
|
||||||
DISTRO_INSTALL="yum -y"
|
DISTRO_INSTALL="yum -y install"
|
||||||
|
DISTRO_REINSTALL="yum -y reinstall"
|
||||||
elif hash zypper 2>/dev/null; then
|
elif hash zypper 2>/dev/null; then
|
||||||
DISTRO=redhat
|
DISTRO=redhat
|
||||||
DISTRO_INSTALL="zypper -y"
|
DISTRO_INSTALL="zypper install"
|
||||||
|
DISTRO_REINSTALL="zypper install --force"
|
||||||
elif hash apt 2>/dev/null; then
|
elif hash apt 2>/dev/null; then
|
||||||
DISTRO=ubuntu
|
DISTRO=ubuntu
|
||||||
DISTRO_INSTALL="apt"
|
DISTRO_INSTALL="apt install"
|
||||||
|
DISTRO_REINSTALL="dpkg -i"
|
||||||
elif hash apt-get 2>/dev/null; then
|
elif hash apt-get 2>/dev/null; then
|
||||||
DISTRO=ubuntu
|
DISTRO=ubuntu
|
||||||
DISTRO_INSTALL="apt-get -y"
|
DISTRO_INSTALL="apt-get -y install"
|
||||||
|
DISTRO_REINSTALL="apt-get -y install --reinstall"
|
||||||
else
|
else
|
||||||
error "Unable to determine distribution, aborting."
|
error "Unable to determine distribution, aborting."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -300,9 +300,7 @@ if [ -z "${DISTRO_INSTALL}" ]; then
|
||||||
check_distro
|
check_distro
|
||||||
BUILD="linux-ubuntu-${ARCH}"
|
BUILD="linux-ubuntu-${ARCH}"
|
||||||
if [ "${FORCE}" = "yes" ]; then
|
if [ "${FORCE}" = "yes" ]; then
|
||||||
DISTRO_INSTALL="${DISTRO INSTALL} reinstall"
|
DISTRO_INSTALL="${DISTRO REINSTALL}"
|
||||||
else
|
|
||||||
DISTRO_INSTALL="${DISTRO_INSTALL} install"
|
|
||||||
fi
|
fi
|
||||||
elif [ -z "${DISTRO}" -o -z "${BUILD}" ]; then
|
elif [ -z "${DISTRO}" -o -z "${BUILD}" ]; then
|
||||||
error "You must define both DISTRO and BUILD"
|
error "You must define both DISTRO and BUILD"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue