From acb5b54bcbb632533b788e4ef6b600356947be6e Mon Sep 17 00:00:00 2001 From: Britney Fransen Date: Sat, 8 Oct 2011 01:48:03 -0500 Subject: linhes-scripts: linhes_update: View Updates in myth menus; double osd_cat calls to work around occasional display issue --- abs/core/linhes-scripts/PKGBUILD | 6 ++-- abs/core/linhes-scripts/linhes_update.sh | 51 +++++++++++++++++++++++-------- abs/core/linhes-scripts/linhes_update2.sh | 9 ++++-- 3 files changed, 47 insertions(+), 19 deletions(-) diff --git a/abs/core/linhes-scripts/PKGBUILD b/abs/core/linhes-scripts/PKGBUILD index 15726ec..f0ca1a6 100644 --- a/abs/core/linhes-scripts/PKGBUILD +++ b/abs/core/linhes-scripts/PKGBUILD @@ -3,7 +3,7 @@ pkgname=linhes-scripts pkgver=7 -pkgrel=9 +pkgrel=10 pkgdesc="Various scripts that help to make LinHES, LinHES." arch=('i686' 'x86_64') license=('GPL2') @@ -78,8 +78,8 @@ md5sums=('f56985b2d602e11dc1e10d3e7848b2a5' '25dd5b8ec0482d561b481bfce051d648' 'b2c3dd48a4abb976eda2d5fbf22a173a' 'b527b01d119d3bc33b8fa69bdf1082bb' - '99f77a83b608bf68808a9ff18df1b53b' - '430e51c1ac7fa1abb938be4322f25ab6' + 'f691c2bdf5da5455c9a5c2ab0ee1f820' + '253d5c9249fbf4641dbf82368efac7cb' '460861e6d0cf999629b734912eea0acf' 'ccca6bdbbd86b203a3eecdbbe363e701' '65629302a4d2c3adf88cdf0ebc10d493' diff --git a/abs/core/linhes-scripts/linhes_update.sh b/abs/core/linhes-scripts/linhes_update.sh index 15efc6f..a307146 100644 --- a/abs/core/linhes-scripts/linhes_update.sh +++ b/abs/core/linhes-scripts/linhes_update.sh @@ -14,11 +14,13 @@ dsply () { if grep -q Updates\ Available /usr/share/mythtv/themes/defaultmenu/linhes.xml then killall -9 osd_cat - echo -e "\nUpdates available!\n Exit and re-enter Service Menu\n to perform updates." | osd_cat --pos=middle --align=center --delay=10 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & + echo -e "\nUpdates available!\nExit and re-enter Service Menu\n to install the updates." | osd_cat --pos=middle --align=center --delay=5 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & + echo -e "\nUpdates available!\nExit and re-enter Service Menu\n to install the updates." | osd_cat --pos=middle --align=center --delay=5 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & exit else killall -9 osd_cat echo -e "Checking for updates..." | osd_cat --pos=middle --align=center --delay=300 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & + echo -e "Checking for updates..." | osd_cat --pos=middle --align=center --delay=300 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & fi } chck () { @@ -28,20 +30,43 @@ chck () { then killall -9 osd_cat echo -e "\nNo updates available." | osd_cat --pos=middle --align=center --delay=5 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & + echo -e "\nNo updates available." | osd_cat --pos=middle --align=center --delay=5 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & else mv /usr/share/mythtv/themes/defaultmenu/linhes.xml /tmp/linhes.xml.tmp - sed -e '/\#Check/,/\#Check/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 "" >> /tmp/linhes.xml.tmp - echo " " >> /tmp/linhes.xml.tmp - echo "" >> /tmp/linhes.xml.tmp - echo "" >> /tmp/linhes.xml.tmp - mv /tmp/linhes.xml.tmp /usr/share/mythtv/themes/defaultmenu/linhes.xml + sed -e '/\#Check/,/\#Check/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 "" >> /tmp/linhes.xml.tmp + echo " " >> /tmp/linhes.xml.tmp + echo "" >> /tmp/linhes.xml.tmp + echo "" >> /tmp/linhes.xml.tmp + mv /tmp/linhes.xml.tmp /usr/share/mythtv/themes/defaultmenu/linhes.xml + + echo "" > /tmp/update3.xml.tmp + if grep kernel26 /tmp/to_be_upgraded + then + echo "" >> /tmp/update3.xml.tmp + echo " " >> /tmp/update3.xml.tmp + fi + + while read line; do + echo "" >> /tmp/update3.xml.tmp + echo " " >> /tmp/update3.xml.tmp + done < "/tmp/to_be_upgraded" + echo "" >> /tmp/update3.xml.tmp + mv /tmp/update3.xml.tmp /usr/share/mythtv/themes/defaultmenu/update3.xml dsply fi } diff --git a/abs/core/linhes-scripts/linhes_update2.sh b/abs/core/linhes-scripts/linhes_update2.sh index ea675d7..78a0519 100644 --- a/abs/core/linhes-scripts/linhes_update2.sh +++ b/abs/core/linhes-scripts/linhes_update2.sh @@ -13,12 +13,14 @@ killall -9 osd_cat echo -e "Updating..." | osd_cat --pos=middle --align=center --delay=300000 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & +echo -e "Updating..." | osd_cat --pos=middle --align=center --delay=300000 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & sudo pacman -Suf --noconfirm && sudo killall -9 osd_cat if grep -q Check\ for\ updates /usr/share/mythtv/themes/defaultmenu/linhes.xml then rm -fr /tmp/to_be_upgraded killall -9 osd_cat -echo -e "\nUpdate complete." | osd_cat --pos=middle --align=center --delay=5 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & +echo -e "\nUpdate complete." | osd_cat --pos=middle --align=center --delay=3 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & +echo -e "\nUpdate complete." | osd_cat --pos=middle --align=center --delay=3 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & else 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 @@ -27,7 +29,7 @@ grep -v -e /mythmenu /tmp/linhes.xml > /tmp/linhes.xml.tmp echo "" >> /tmp/linhes.xml.tmp echo " " >> /tmp/linhes.xml.tmp echo "" >> /tmp/linhes.xml.tmp @@ -36,5 +38,6 @@ echo "" >> /tmp/linhes.xml.tmp mv /tmp/linhes.xml.tmp /usr/share/mythtv/themes/defaultmenu/linhes.xml rm -fr /tmp/to_be_upgraded killall -9 osd_cat -echo -e "\nUpdate complete." | osd_cat --pos=middle --align=center --delay=5 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & +echo -e "\nUpdate complete." | osd_cat --pos=middle --align=center --delay=3 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & +echo -e "\nUpdate complete." | osd_cat --pos=middle --align=center --delay=3 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & fi -- cgit v0.12