From cafcd5d4368e57f162a641ed3f4835ecb5a6d391 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 28 Feb 2002 14:09:04 +0000 Subject: Initial revision --- host-update | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 host-update (limited to 'host-update') 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" -- cgit v1.2.3