summaryrefslogtreecommitdiff
path: root/host-update
diff options
context:
space:
mode:
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"