summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system/linhes_update2.sh
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2015-11-23 17:54:42 (GMT)
committerBritney Fransen <brfransen@gmail.com>2015-11-23 17:54:42 (GMT)
commit214fa024f53003b4ce5aa0a7888f12f80684703f (patch)
treeb02989e29c88751d92b44f20dc652bd5851659dc /abs/core/LinHES-system/linhes_update2.sh
parent917316aa3b3dc34b579616286f26666a8243d998 (diff)
downloadlinhes_pkgbuild-214fa024f53003b4ce5aa0a7888f12f80684703f.zip
linhes_pkgbuild-214fa024f53003b4ce5aa0a7888f12f80684703f.tar.gz
linhes_pkgbuild-214fa024f53003b4ce5aa0a7888f12f80684703f.tar.bz2
LinHES-system: linhes_update.sh & linhes_update2.sh: fix linhes.xml from being incomplete
grep 2.22 changed of behavior so changed the options don't use pkill -USR1 mythfrontend as it causes some keybindings to not work after.
Diffstat (limited to 'abs/core/LinHES-system/linhes_update2.sh')
-rw-r--r--abs/core/LinHES-system/linhes_update2.sh49
1 files changed, 21 insertions, 28 deletions
diff --git a/abs/core/LinHES-system/linhes_update2.sh b/abs/core/LinHES-system/linhes_update2.sh
index 5c05c99..6c249d3 100644
--- a/abs/core/LinHES-system/linhes_update2.sh
+++ b/abs/core/LinHES-system/linhes_update2.sh
@@ -4,14 +4,14 @@
if [[ "$1" = "install" ]]
then
msg_client.py --msg "Updating...|middle" --timeout 600 --tag "Updating"
- sudo pacman -Su --force --noconfirm
+ sudo pacman -Su --force --noconfirm
msg_client.py --clear --tag "Updating"
msg_client.py --kill
msg_client.py --msg "Updates complete.\nReturning to Main Menu.|middle"
- if grep linux /tmp/to_be_upgraded || grep nvidia /tmp/to_be_upgraded
- then
+ if grep linux /tmp/to_be_upgraded || grep nvidia /tmp/to_be_upgraded
+ then
msg_client.py --msg "Updates require a reboot.|middle"
- fi
+ fi
else
msg_client.py --msg "Updates canceled.|middle"
fi
@@ -20,32 +20,25 @@ sudo 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 " <description>Update the LinHES system</description>" >> /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
+ 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 -va '/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 " <description>Update the LinHES system</description>" >> /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
#hide LinHES update message on main menu
sudo sed -i '/LinHES UPDATE MESSAGE/c\ <!--LinHES UPDATE MESSAGE' /usr/share/mythtv/themes/LinHES/menu-ui.xml
-#reload theme
-#check if started from mythfrontend-start and if so just kill mfe
-#otherwise reload mfe
-if [[ `pgrep -fx "/bin/bash /usr/LH/bin/mythfrontend-start"` ]]
-then
- killall mythfrontend
-else
- pkill -USR1 mythfrontend
-fi
+#reload mythfrontend
+killall mythfrontend