Add a if not uptodate :P
This commit is contained in:
parent
5c13966493
commit
891fe98e5d
1 changed files with 11 additions and 7 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
INSTALLED=`dpkg-query -W -f='${Version}' plexmediaserver`
|
||||||
|
|
||||||
if [[ "$PLEXPASS" ]]; then
|
if [[ "$PLEXPASS" ]]; then
|
||||||
echo "PLEXPASS is depricated, please use VERSION"
|
echo "PLEXPASS is depricated, please use VERSION"
|
||||||
|
|
@ -18,12 +18,16 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
last=130
|
last=130
|
||||||
|
if [[ ! "$VERSION" == "$INSTALLED "]]; then
|
||||||
while [ last -ne "0"]; do
|
echo "Upgradeing from version: $INSTALLED to version: $VERSION"
|
||||||
rm -f /tmp/plexmediaserver_*.deb
|
while [ last -ne "0"]; do
|
||||||
wget -P /tmp "http://downloads.plexapp.com/plex-media-server/$VERSION/plexmediaserver_${VERSION}_amd64.deb"
|
rm -f /tmp/plexmediaserver_*.deb
|
||||||
last=$?
|
wget -P /tmp "http://downloads.plexapp.com/plex-media-server/$VERSION/plexmediaserver_${VERSION}_amd64.deb"
|
||||||
done
|
last=$?
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "Allready Uptodate"
|
||||||
|
fi
|
||||||
|
|
||||||
apt-get remove --purge -y plexmediaserver
|
apt-get remove --purge -y plexmediaserver
|
||||||
gdebi -n /tmp/plexmediaserver_${VERSION}_amd64.deb
|
gdebi -n /tmp/plexmediaserver_${VERSION}_amd64.deb
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue