From d54c50f624bca3e4094b6be022636db762328b32 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 19 Feb 2008 23:26:00 +0000 Subject: debianhosts git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@318 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- zshrc | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'zshrc') diff --git a/zshrc b/zshrc index 7179a10..4288496 100644 --- a/zshrc +++ b/zshrc @@ -346,7 +346,7 @@ cols() { upgrade-porter-chroots() { cd - for i in `cat ~/.csshrc | grep '^porterbox' | sed -e 's/^.*=//' | tr ' ' '\n'`; do + for i in `cat ~/.csshrc | grep '^debporterbox' | sed -e 's/^.*=//' | tr ' ' '\n'`; do if [ -e hosts/chroot-$i ]; then continue; fi @@ -365,7 +365,22 @@ upgrade-porter-chroots() { } upgrade-porter-hosts() { cd - for i in `cat ~/.csshrc | grep '^porterbox' | sed -e 's/^.*=//' | tr ' ' '\n'`; do + for i in `cat ~/.csshrc | grep '^debporterbox' | sed -e 's/^.*=//' | tr ' ' '\n'`; do + if [ -e hosts/$i ]; then + continue; + fi + touch hosts/$i; + echo $i; + ssh $i -t ' + sudo apt-get update && + sudo apt-get dist-upgrade && + sudo apt-get clean; + '; + done +} +upgrade-debian-hosts() { + cd + for i in `cat ~/.csshrc | grep '^deb' | sed -e 's/^.*=//' | tr ' ' '\n'`; do if [ -e hosts/$i ]; then continue; fi -- cgit v1.2.3