diff --git a/shells/zshrc b/shells/zshrc index 43ed496..e46793f 100644 --- a/shells/zshrc +++ b/shells/zshrc @@ -62,7 +62,16 @@ if test -f /etc/gentoo-release; then echo "args: $*" sudo zsh -c "emerge --autounmask-write -av $*" } - alias update='cd /usr/portage&&sudo zsh -c "git up&&echo Done pulling&&eix-update&&echo Done with eix";\cd ->/dev/null' + function update(){ + # If this is a server computer + if [ "$(hostname|cut -b1)" = "S" ] ; then + echo "You're a server. Exiting" + exit + fi + cd /usr/portage >/dev/null + sudo zsh -c "git up&&echo Done pulling&&eix-update&&echo Done with eix" + cd ->/dev/null + } alias upgrade='sudo emerge --update --newuse --with-bdeps=y --deep --verbose -t -a --keep-going=y @world' elif test -f /etc/lsb-release; then # Ubuntu