Updated update script

This commit is contained in:
Veit Heller
2014-07-02 01:53:24 +02:00
parent b88376f929
commit 00dca735da
2 changed files with 8 additions and 7 deletions

View File

@@ -65,9 +65,9 @@ pinfo(){
}
update(){
yellow='\e[1;33m'
none='\e[0m'
if $1 == '-v' ; then
yellow='\x1B[0;33m'
none='\x1B[0m'
if [[ $1 == '-v' ]] ; then
echo -e "${yellow}Updating homebrew formulae${none}"
brew update
echo -e "${yellow}Updating installed sources(Homebrew)${none}"

9
zshrc
View File

@@ -99,9 +99,10 @@ pinfo(){
}
update(){
yellow='\e[1;33m'
none='\e[0m'
if $1 == '-v' ; then
autoload -U colors && colors
yellow=$fg_no_bold[yellow]
none=$reset_color
if [[ $1 == '-v' ]] ; then
echo -e "${yellow}Updating homebrew formulae${none}"
brew update
echo -e "${yellow}Updating installed sources(Homebrew)${none}"
@@ -118,6 +119,6 @@ update(){
echo -e "${yellow}Updating MacPorts (sudo required)${none}"
sudo port selfupdate &> /dev/null
echo -e "${yellow}Updating installed sources(MacPorts)${none}"
sudo port upgrade outdated & /dev/null
sudo port upgrade outdated &> /dev/null
fi
}