summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system/lh_system_host_update
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2011-12-30 19:03:20 (GMT)
committerJames Meyer <james.meyer@operamail.com>2011-12-30 19:03:20 (GMT)
commit68def16b69900b781eab3f36f27d94eaf42a360b (patch)
tree55ae3b3f8a8611d73e1b2e4eb2bb12fe9c6d9fdd /abs/core/LinHES-system/lh_system_host_update
parentf01f4a6a837ccbdc55107bb0738846b5a56f1462 (diff)
downloadlinhes_pkgbuild-68def16b69900b781eab3f36f27d94eaf42a360b.zip
linhes_pkgbuild-68def16b69900b781eab3f36f27d94eaf42a360b.tar.gz
linhes_pkgbuild-68def16b69900b781eab3f36f27d94eaf42a360b.tar.bz2
linhes-system: add new utils for backup/update/and restore
Diffstat (limited to 'abs/core/LinHES-system/lh_system_host_update')
-rw-r--r--abs/core/LinHES-system/lh_system_host_update56
1 files changed, 56 insertions, 0 deletions
diff --git a/abs/core/LinHES-system/lh_system_host_update b/abs/core/LinHES-system/lh_system_host_update
new file mode 100644
index 0000000..1a4d714
--- /dev/null
+++ b/abs/core/LinHES-system/lh_system_host_update
@@ -0,0 +1,56 @@
+#!/bin/bash
+# Process that call this script
+# func update
+# supplemental web
+echo "#####################################################"
+echo "Starting update"
+. /etc/profile
+
+if [ x$1 = x ]
+then
+ . /etc/systemconfig
+else
+Hostupdateplan=$1
+fi
+
+
+case $Hostupdateplan in
+ "Myth_only")
+ echo "Updating myth packages"
+ postfix=`cat $INSTALL_DIR/usr/local/share/mythtv/.releasetype`
+ for mythl in mythphone mytharchive mythbrowser mythnews mythgame mythflix mythweather mythcontrols mythgallery mythmovietime mythmusic mythsmolt mythvideo mythweb mythtv
+ do
+ mythlist="$mythlist $mythl$postfix"
+ done
+
+ pacman -Sy
+ list=`pacman -Qu $pkg |grep Targets`
+ for pkg in LinHES-config LinHES-system mythinstall $mythlist
+ do
+ echo $list|grep -q $pkg
+ if [ $? = 0 ]
+ then
+ echo "Updating $pkg"
+ pacman --noconfirm -S $pkg
+ else
+ echo "$pkg is up to date"
+ fi
+ done
+ ;;
+ "All")
+ echo ""
+ echo "Updating ALL packages"
+ pacman -Sy
+ pacman --noconfirm -Sfu
+ ;;
+ "None")
+ echo ""
+ echo "Updating NO packages"
+ ;;
+ *) echo ""
+ echo "Unknown $Hostupdateplan, skipping updates"
+ ;;
+esac
+
+
+echo "##################################################################################"