|
38 | 38 | logger -t Sundtek "### Starting updating driver ###" |
39 | 39 | kodi-send -a "Notification(Sundtek, Starting updating driver, 3000, $SUNDTEK_ADDON_DIR/icon.png)" |
40 | 40 |
|
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 |
43 | 42 | logger -t Sundtek "### Can't get latest version ###" |
44 | 43 | kodi-send -a "Notification(Sundtek, Cant get latest version, 8000, $SUNDTEK_ADDON_DIR/icon.png)" |
45 | 44 | cd .. |
|
64 | 63 |
|
65 | 64 | logger -t Sundtek "### Downloading driver archive for $ARCH ###" |
66 | 65 | 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 |
69 | 67 | logger -t Sundtek "### Archive damaged ###" |
70 | 68 | kodi-send -a "Notification(Sundtek, Download failed, 8000, $SUNDTEK_ADDON_DIR/icon.png)" |
71 | 69 | cd .. |
|
75 | 73 |
|
76 | 74 | logger -t Sundtek "### Extracting archive ###" |
77 | 75 | 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 |
80 | 77 | logger -t Sundtek "### Archive damaged ###" |
81 | 78 | kodi-send -a "Notification(Sundtek, Archive damaged, 8000, $SUNDTEK_ADDON_DIR/icon.png)" |
82 | 79 | cd .. |
|
0 commit comments