summaryrefslogtreecommitdiffstats
path: root/abs
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-09-18 04:25:47 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-09-18 04:25:47 (GMT)
commit133d305a7b472469c7853090a8dab72b27d281a9 (patch)
treef479b60904257534bf22d27568e335db8170d57e /abs
parent31a6bdb2d475c50918bbd4be8bc6190d31ce36b5 (diff)
downloadlinhes_pkgbuild-133d305a7b472469c7853090a8dab72b27d281a9.zip
linhes_pkgbuild-133d305a7b472469c7853090a8dab72b27d281a9.tar.gz
linhes_pkgbuild-133d305a7b472469c7853090a8dab72b27d281a9.tar.bz2
linhes-scripts:Added manual update scripts.
Diffstat (limited to 'abs')
-rw-r--r--abs/core-testing/linhes-scripts/PKGBUILD4
-rw-r--r--abs/core-testing/linhes-scripts/linhes_update.sh36
-rw-r--r--abs/core-testing/linhes-scripts/linhes_update2.sh25
3 files changed, 64 insertions, 1 deletions
diff --git a/abs/core-testing/linhes-scripts/PKGBUILD b/abs/core-testing/linhes-scripts/PKGBUILD
index de72624..9efa747 100644
--- a/abs/core-testing/linhes-scripts/PKGBUILD
+++ b/abs/core-testing/linhes-scripts/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=linhes-scripts
pkgver=1
-pkgrel=24
+pkgrel=25
pkgdesc="Various scripts that help to make LinHES, LinHES."
arch=('i686' 'x86_64')
license=('GPL2')
@@ -29,6 +29,8 @@ vdpau-detector
idle.sh
screenshooter.sh
run-limit-mythcommflag
+linhes_update.sh
+linhes_update2.sh
)
build() {
diff --git a/abs/core-testing/linhes-scripts/linhes_update.sh b/abs/core-testing/linhes-scripts/linhes_update.sh
new file mode 100644
index 0000000..27ada60
--- /dev/null
+++ b/abs/core-testing/linhes-scripts/linhes_update.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+dsply () {
+ if grep -q Updates\ Available /usr/share/mythtv/linhes.xml
+ then
+ killall 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
+ exit
+ else
+ echo -e "Checking for updates." | osd_cat -p middle -s 5 -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 300 -A centre &
+ fi
+}
+chck () {
+ sudo pacman -Sy > /tmp/check_update
+ if grep -q is\ up\ to\ date /tmp/check_update
+ then
+ killall 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
+ else
+ mv /usr/share/mythtv/linhes.xml /tmp/linhes.xml.tmp
+ sed -e '/\#Check/,/\#Check/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 "<!--#UpdatesAvailable-->" >> /tmp/linhes.xml.tmp
+ echo " <button>" >> /tmp/linhes.xml.tmp
+ echo " <type>UPDATES</type>" >> /tmp/linhes.xml.tmp
+ echo " <text>Updates Available</text>" >> /tmp/linhes.xml.tmp
+ echo " <action>MENU update2.xml</action>" >> /tmp/linhes.xml.tmp
+ echo " </button>" >> /tmp/linhes.xml.tmp
+ echo "<!--#UpdatesAvailable-->" >> /tmp/linhes.xml.tmp
+ echo "</mythmenu>" >> /tmp/linhes.xml.tmp
+ mv /tmp/linhes.xml.tmp /usr/share/mythtv/linhes.xml
+ dsply
+ fi
+}
+dsply
+chck
diff --git a/abs/core-testing/linhes-scripts/linhes_update2.sh b/abs/core-testing/linhes-scripts/linhes_update2.sh
new file mode 100644
index 0000000..84ee57f
--- /dev/null
+++ b/abs/core-testing/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
+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>UPDATES</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/linhes.xml
+echo -e "Update complete." | osd_cat -p middle -s 5 -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 5 -A centre
+
+
+
+
+
+
+