summaryrefslogtreecommitdiffstats
path: root/abs/core/linhes-scripts/linhes_update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/linhes-scripts/linhes_update.sh')
-rw-r--r--abs/core/linhes-scripts/linhes_update.sh20
1 files changed, 15 insertions, 5 deletions
diff --git a/abs/core/linhes-scripts/linhes_update.sh b/abs/core/linhes-scripts/linhes_update.sh
index 39d2817..15efc6f 100644
--- a/abs/core/linhes-scripts/linhes_update.sh
+++ b/abs/core/linhes-scripts/linhes_update.sh
@@ -1,23 +1,33 @@
#!/bin/bash
+
+#----------------------------------------------------------------------------
+. /etc/osd_cat.cfg || {
+ color=yellow
+ outline=2
+ outlinecolour=black
+ shadow=0
+ shadowcolour=black
+ font="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*"
+}
+#----------------------------------------------------------------------------
dsply () {
if grep -q Updates\ Available /usr/share/mythtv/themes/defaultmenu/linhes.xml
then
killall -9 osd_cat
- echo -e "Updates available!\n Exit and reenter Service Menu\n to perform updates." | osd_cat -p middle -s 5 -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 10 -A centre
+ 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 &
exit
else
killall -9 osd_cat
- echo -e "Checking for updates." | osd_cat -p middle -s 5 -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 300 -A centre &
+ 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 () {
sudo pacman -Sy
sudo pacman -Qu > /tmp/to_be_upgraded
-# sudo grep Target /tmp/check_update > /tmp/to_be_upgraded
- if grep -q no\ upgrades\ found /tmp/check_update
+ if [[ ! -s /tmp/to_be_upgraded ]]
then
killall -9 osd_cat
- echo -e "No updates available\n at this time." | osd_cat -p middle -s 5 -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 5 -A centre
+ 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