diff options
author | Peter Palfrader <peter@palfrader.org> | 2008-06-27 07:11:08 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2008-06-27 07:11:08 +0000 |
commit | d67eea3092c61554baa8ff411a54335ec910c397 (patch) | |
tree | ef3ced2bc23e80216b18842c24daf4abf08e2284 /zshrc | |
parent | 710c6fab327243002dd12b03fd659ba5c8fc22b2 (diff) |
Use mkdir as it is atomic, and add upgrade-came
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@358 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'zshrc')
-rw-r--r-- | zshrc | 35 |
1 files changed, 19 insertions, 16 deletions
@@ -350,10 +350,7 @@ cols() { upgrade-porter-chroots() { cd for i in `cat ~/.csshrc | grep '^debporterbox' | sed -e 's/^.*=//' | tr ' ' '\n'`; do - if [ -e hosts/chroot-$i ]; then - continue; - fi - touch hosts/chroot-$i; + mkdir hosts/chroot-$i 2>/dev/null || continue; echo $i; preexec $i; ssh $i -t 'cd ~/chroot && @@ -371,10 +368,7 @@ upgrade-porter-chroots() { upgrade-porter-hosts() { cd for i in `cat ~/.csshrc | grep '^debporterbox' | sed -e 's/^.*=//' | tr ' ' '\n'`; do - if [ -e hosts/$i ]; then - continue; - fi - touch hosts/$i; + mkdir hosts/chroot-$i 2>/dev/null || continue; echo $i; preexec $i; ssh $i -t ' @@ -387,10 +381,7 @@ upgrade-porter-hosts() { upgrade-debian-hosts() { cd for i in `cat ~/.csshrc | grep '^deb' | sed -e 's/^.*=//' | tr ' ' '\n'`; do - if [ -e hosts/$i ]; then - continue; - fi - touch hosts/$i; + mkdir hosts/chroot-$i 2>/dev/null || continue; echo $i; preexec $i; ssh $i -t ' @@ -404,10 +395,22 @@ upgrade-debian-hosts() { upgrade-systems() { cd for i in `cat ~/.csshrc | tr ' ' '\n' | grep @`; do - if [ -e hosts/$i ]; then - continue; - fi; - touch hosts/$i; + mkdir hosts/chroot-$i 2>/dev/null || continue; + echo $i; + preexec $i; + ssh $i -t 'apt-get update && + if [ -e /usr/bin/apt-get.distrib ]; then + aptitude dist-upgrade; + else + apt-get dist-upgrade; + fi && + apt-get clean'; + done +} +upgrade-came() { + cd + for i in $HOSTS; do + mkdir hosts/chroot-$i 2>/dev/null || continue; echo $i; preexec $i; ssh $i -t 'apt-get update && |