Skip to content

Commit 2bbb06d

Browse files
authored
Merge pull request #11111 from gkapetanakis/master
addons/sundtek-mediatv: Fix error handling in the driver update script
2 parents 14250c1 + 81dd1f7 commit 2bbb06d

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

packages/addons/driver/sundtek-mediatv/package.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
PKG_NAME="sundtek-mediatv"
66
PKG_VERSION="7.0"
7-
PKG_REV="0"
7+
PKG_REV="1"
88
PKG_ARCH="any"
99
PKG_LICENSE="nonfree"
1010
PKG_SITE="http://support.sundtek.com/"

packages/addons/driver/sundtek-mediatv/source/bin/sundtek-update-driver.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ cd tmp
3838
logger -t Sundtek "### Starting updating driver ###"
3939
kodi-send -a "Notification(Sundtek, Starting updating driver, 3000, $SUNDTEK_ADDON_DIR/icon.png)"
4040

41-
wget -O ../version.used http://sundtek.de/media/latest.phtml
42-
if [ $? -ne 0 ]; then
41+
if ! wget -O ../version.used http://sundtek.de/media/latest.phtml; then
4342
logger -t Sundtek "### Can't get latest version ###"
4443
kodi-send -a "Notification(Sundtek, Cant get latest version, 8000, $SUNDTEK_ADDON_DIR/icon.png)"
4544
cd ..
@@ -64,8 +63,7 @@ fi
6463

6564
logger -t Sundtek "### Downloading driver archive for $ARCH ###"
6665
kodi-send -a "Notification(Sundtek, Downloading driver archive for $ARCH, 3000, $SUNDTEK_ADDON_DIR/icon.png)"
67-
wget -O installer.tar.gz $INSTALLER_URL
68-
if [ $? -ne 0 ]; then
66+
if ! wget -O installer.tar.gz $INSTALLER_URL; then
6967
logger -t Sundtek "### Archive damaged ###"
7068
kodi-send -a "Notification(Sundtek, Download failed, 8000, $SUNDTEK_ADDON_DIR/icon.png)"
7169
cd ..
@@ -75,8 +73,7 @@ fi
7573

7674
logger -t Sundtek "### Extracting archive ###"
7775
kodi-send -a "Notification(Sundtek, Extracting archive, 3000, $SUNDTEK_ADDON_DIR/icon.png)"
78-
tar -xzf installer.tar.gz
79-
if [ $? -ne 0 ]; then
76+
if ! tar -xzf installer.tar.gz; then
8077
logger -t Sundtek "### Archive damaged ###"
8178
kodi-send -a "Notification(Sundtek, Archive damaged, 8000, $SUNDTEK_ADDON_DIR/icon.png)"
8279
cd ..

0 commit comments

Comments
 (0)