From 133d305a7b472469c7853090a8dab72b27d281a9 Mon Sep 17 00:00:00 2001 From: Cecil Hugh Watson Date: Thu, 17 Sep 2009 21:25:47 -0700 Subject: linhes-scripts:Added manual update scripts. --- abs/core-testing/linhes-scripts/PKGBUILD | 4 ++- abs/core-testing/linhes-scripts/linhes_update.sh | 36 +++++++++++++++++++++++ abs/core-testing/linhes-scripts/linhes_update2.sh | 25 ++++++++++++++++ 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 abs/core-testing/linhes-scripts/linhes_update.sh create mode 100644 abs/core-testing/linhes-scripts/linhes_update2.sh 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 "" >> /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/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 "" >> /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/linhes.xml +echo -e "Update complete." | osd_cat -p middle -s 5 -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 5 -A centre + + + + + + + -- cgit v0.12