diff options
Diffstat (limited to 'zshfunc/upgrade-systems')
-rw-r--r-- | zshfunc/upgrade-systems | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/zshfunc/upgrade-systems b/zshfunc/upgrade-systems new file mode 100644 index 0000000..071c8dc --- /dev/null +++ b/zshfunc/upgrade-systems @@ -0,0 +1,17 @@ +## vim:ft=zsh:foldmethod=marker + +upgrade-systems() { + cd + for i in $HOSTS; do + mkdir hosts/$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 +} |