summaryrefslogtreecommitdiff
path: root/host-update
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2002-02-28 14:09:04 +0000
committerJonas Smedegaard <dr@jones.dk>2002-02-28 14:09:04 +0000
commitcafcd5d4368e57f162a641ed3f4835ecb5a6d391 (patch)
tree56166fbf16289d8b388cf0f1f9b51e28c3c4bdf9 /host-update
Initial revision
Diffstat (limited to 'host-update')
-rwxr-xr-xhost-update29
1 files changed, 29 insertions, 0 deletions
diff --git a/host-update b/host-update
new file mode 100755
index 0000000..a66fc12
--- /dev/null
+++ b/host-update
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+usage () {
+ echo "Usage: $(basename $0) {host}"
+}
+
+termwrapper () {
+ title="$title $titleopt"
+ echo $@
+ echo xsh --title "Host update" --host $HOST $@ && touch /etc/local-LOCAL/machines/$args
+ xsh --title "Host update" --host $HOST $@ && touch /etc/local-LOCAL/machines/$args
+}
+
+args=''
+argc=0
+while [ $# -gt 0 ]; do
+ case $1 in
+ -*) usage; exit 1;;
+ *) args="$args $1"; argc=$(($argc+1));;
+ esac
+ shift
+done
+set -- $args
+
+if [ $argc -ne 1 ]; then
+ usage; exit 1;
+fi
+HOST=$1
+termwrapper "apt-get update; apt-get upgrade"