Blame view
tools/upgrade.sh
1.38 KB
|
ed37aae5b
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# Use colors, but only if connected to a terminal, and that terminal
# supports them.
if which tput >/dev/null 2>&1; then
ncolors=$(tput colors)
fi
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
RED="$(tput setaf 1)"
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
printf "${BLUE}%s${NORMAL}
" "Upgrading Oh My Zsh"
|
|
093a6c34b
|
25 26 27 |
cd "$ZSH" if git pull --rebase --stat origin master then |
|
ed37aae5b
|
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
printf '%s' "$GREEN"
printf '%s
' ' __ __ '
printf '%s
' ' ____ / /_ ____ ___ __ __ ____ _____/ /_ '
printf '%s
' ' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '
printf '%s
' '/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '
printf '%s
' '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '
printf '%s
' ' /____/ '
printf "${BLUE}%s
" "Hooray! Oh My Zsh has been updated and/or is at the current version."
printf "${BLUE}${BOLD}%s${NORMAL}
" "To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh"
printf "${BLUE}${BOLD}%s${NORMAL}
" "Get your Oh My Zsh swag at: http://shop.planetargon.com/"
|
|
093a6c34b
|
47 |
else |
|
ed37aae5b
|
48 49 |
printf "${RED}%s${NORMAL}
" 'There was an error updating. Try again later?'
|
|
093a6c34b
|
50 |
fi |