2015-07-07 03:18:32 +03:00
|
|
|
|
|
|
|
# Use colors, but only if connected to a terminal, and that terminal
|
|
|
|
# supports them.
|
2015-10-15 16:37:30 +03:00
|
|
|
if which tput >/dev/null 2>&1; then
|
2015-09-22 17:46:22 +03:00
|
|
|
ncolors=$(tput colors)
|
|
|
|
fi
|
2015-07-07 03:18:32 +03:00
|
|
|
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
|
2015-08-31 20:29:54 +03:00
|
|
|
RED="$(tput setaf 1)"
|
2015-07-07 03:18:32 +03:00
|
|
|
GREEN="$(tput setaf 2)"
|
|
|
|
YELLOW="$(tput setaf 3)"
|
|
|
|
BLUE="$(tput setaf 4)"
|
|
|
|
BOLD="$(tput bold)"
|
|
|
|
NORMAL="$(tput sgr0)"
|
|
|
|
else
|
|
|
|
RED=""
|
|
|
|
GREEN=""
|
|
|
|
YELLOW=""
|
|
|
|
BLUE=""
|
|
|
|
BOLD=""
|
|
|
|
NORMAL=""
|
|
|
|
fi
|
|
|
|
|
2015-06-29 08:48:35 +03:00
|
|
|
printf "${BLUE}%s${NORMAL}\n" "Updating Oh My Zsh"
|
2013-03-10 23:36:39 +04:00
|
|
|
cd "$ZSH"
|
2013-11-22 03:34:33 +04:00
|
|
|
if git pull --rebase --stat origin master
|
2012-01-15 10:49:52 +04:00
|
|
|
then
|
2015-07-07 03:18:32 +03:00
|
|
|
printf '%s' "$GREEN"
|
|
|
|
printf '%s\n' ' __ __ '
|
|
|
|
printf '%s\n' ' ____ / /_ ____ ___ __ __ ____ _____/ /_ '
|
|
|
|
printf '%s\n' ' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '
|
|
|
|
printf '%s\n' '/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '
|
|
|
|
printf '%s\n' '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '
|
|
|
|
printf '%s\n' ' /____/ '
|
|
|
|
printf "${BLUE}%s\n" "Hooray! Oh My Zsh has been updated and/or is at the current version."
|
2015-08-18 10:01:21 +03:00
|
|
|
printf "${BLUE}${BOLD}%s${NORMAL}\n" "To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh"
|
2015-07-07 03:18:32 +03:00
|
|
|
printf "${BLUE}${BOLD}%s${NORMAL}\n" "Get your Oh My Zsh swag at: http://shop.planetargon.com/"
|
2012-01-15 10:49:52 +04:00
|
|
|
else
|
2015-07-07 03:18:32 +03:00
|
|
|
printf "${RED}%s${NORMAL}\n" 'There was an error updating. Try again later?'
|
2012-01-15 10:49:52 +04:00
|
|
|
fi
|