Update test if server

This commit is contained in:
Austen Adler 2015-08-25 14:14:40 +00:00
parent d27050173e
commit 1b7df5050d

View File

@ -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