diff options
author | Britney Fransen <brfransen@gmail.com> | 2013-10-16 20:41:16 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2013-10-16 20:41:16 (GMT) |
commit | 4fb36a904c3818185105d2fe09adc512c46285c7 (patch) | |
tree | 56c1deb162824e4695133a955a6022e90282dd79 /abs/core/LinHES-system/linhes_update2.sh | |
parent | 2648e999d277eac5c3d331a3609bcc73fafbea71 (diff) | |
parent | 36f4b0be52fddbd5f491da90475e69c25bf6903f (diff) | |
download | linhes_pkgbuild-4fb36a904c3818185105d2fe09adc512c46285c7.zip linhes_pkgbuild-4fb36a904c3818185105d2fe09adc512c46285c7.tar.gz linhes_pkgbuild-4fb36a904c3818185105d2fe09adc512c46285c7.tar.bz2 |
Merge branch 'testing'
Diffstat (limited to 'abs/core/LinHES-system/linhes_update2.sh')
-rw-r--r-- | abs/core/LinHES-system/linhes_update2.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/abs/core/LinHES-system/linhes_update2.sh b/abs/core/LinHES-system/linhes_update2.sh new file mode 100644 index 0000000..fbdd36b --- /dev/null +++ b/abs/core/LinHES-system/linhes_update2.sh @@ -0,0 +1,37 @@ +#!/bin/bash + + +if [[ "$1" = "install" ]] +then + msg_client.py --msg "Updating...|middle" --timeout 600 --tag "Updating" + sudo pacman -Su --force --noconfirm + msg_client.py --clear --tag "Updating" + msg_client.py --kill + msg_client.py --msg "Updates complete.|middle" + if grep linux /tmp/to_be_upgraded || grep nvidia /tmp/to_be_upgraded + then + msg_client.py --msg "Updates require a reboot.|middle" + fi +else + msg_client.py --msg "Updates canceled.|middle" +fi + +rm -fr /tmp/to_be_upgraded + +if grep -q Updates\ Available /usr/share/mythtv/themes/defaultmenu/linhes.xml +then + mv /usr/share/mythtv/themes/defaultmenu/linhes.xml /tmp/linhes.xml.tmp + sed -e '/\#UpdatesAv/,/\#UpdatesAv/d' < /tmp/linhes.xml.tmp > /usr/share/mythtv/themes/defaultmenu/linhes.xml + mv /usr/share/mythtv/themes/defaultmenu/linhes.xml /tmp + grep -v -e /mythmenu /tmp/linhes.xml > /tmp/linhes.xml.tmp + echo "<!--#Check for updates-->" >> /tmp/linhes.xml.tmp + echo " <button>" >> /tmp/linhes.xml.tmp + echo " <type>UPGRADE</type>" >> /tmp/linhes.xml.tmp + echo " <text>Update LinHES</text>" >> /tmp/linhes.xml.tmp + echo " <action>MENU update.xml</action>" >> /tmp/linhes.xml.tmp + echo " </button>" >> /tmp/linhes.xml.tmp + echo "<!--#Check for updates-->" >> /tmp/linhes.xml.tmp + echo "" >> /tmp/linhes.xml.tmp + echo "</mythmenu>" >> /tmp/linhes.xml.tmp + mv /tmp/linhes.xml.tmp /usr/share/mythtv/themes/defaultmenu/linhes.xml +fi |