diff options
author | Cecil Hugh Watson <knoppmyth@gmail.com> | 2009-09-26 01:57:08 (GMT) |
---|---|---|
committer | Cecil Hugh Watson <knoppmyth@gmail.com> | 2009-09-26 01:57:08 (GMT) |
commit | 7b29169fff9e7c624890c5edffe85def8a293136 (patch) | |
tree | 47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/core/linhes-scripts/linhes_update2.sh | |
parent | c491dea779dac29afff3578bf8245943817c2339 (diff) | |
download | linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2 |
LinHES 6.01.00
Diffstat (limited to 'abs/core/linhes-scripts/linhes_update2.sh')
-rw-r--r-- | abs/core/linhes-scripts/linhes_update2.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/abs/core/linhes-scripts/linhes_update2.sh b/abs/core/linhes-scripts/linhes_update2.sh new file mode 100644 index 0000000..20f32b9 --- /dev/null +++ b/abs/core/linhes-scripts/linhes_update2.sh @@ -0,0 +1,25 @@ +#!/bin/bash +echo -e "Performing updates." | osd_cat -p middle -s 5 -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 300000 -A centre & +sudo pacman -Syuf --noconfirm && sudo killall -9 osd_cat +if grep -q Check\ for\ updates /usr/share/mythtv/linhes.xml +then +rm -fr /tmp/to_be_upgraded +echo -e "Update complete." | osd_cat -p middle -s 5 -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 5 -A centre +else +mv /usr/share/mythtv/linhes.xml /tmp/linhes.xml.tmp +sed -e '/\#UpdatesAv/,/\#UpdatesAv/d' < /tmp/linhes.xml.tmp > /usr/share/mythtv/linhes.xml +mv /usr/share/mythtv/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>Upgrade 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/linhes.xml +rm -fr /tmp/to_be_upgraded +echo -e "Update complete." | osd_cat -p middle -s 5 -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 5 -A centre +fi |