29eddb66131b70e2c9da5dde5994690f8fe1832d

Author
Marc Cornellà <marc.cornella@live.com>
Committer
GitHub <noreply@github.com>
Date

Message

update: display logo in rainbow colors (#8941)

Diff

 1diff --git a/tools/upgrade.sh b/tools/upgrade.sh
 2index 10f816080f2d88ee37f2ed5f67a42e7a1bf3c2ee..78a12f02300ca0ab3fd7a47226b0652bfec68cbc 100644
 3--- a/tools/upgrade.sh
 4+++ b/tools/upgrade.sh
 5@@ -1,7 +1,14 @@
 6-
 7 # Use colors, but only if connected to a terminal, and that terminal
 8 # supports them.
 9 if [ -t 1 ]; then
10+  RB_RED=$(printf '\033[38;5;196m')
11+  RB_ORANGE=$(printf '\033[38;5;202m')
12+  RB_YELLOW=$(printf '\033[38;5;226m')
13+  RB_GREEN=$(printf '\033[38;5;082m')
14+  RB_BLUE=$(printf '\033[38;5;021m')
15+  RB_INDIGO=$(printf '\033[38;5;093m')
16+  RB_VIOLET=$(printf '\033[38;5;163m')
17+
18   RED=$(printf '\033[31m')
19   GREEN=$(printf '\033[32m')
20   YELLOW=$(printf '\033[33m')
21@@ -9,6 +16,14 @@ if [ -t 1 ]; then
22   BOLD=$(printf '\033[1m')
23   RESET=$(printf '\033[m')
24 else
25+  RB_RED=""
26+  RB_ORANGE=""
27+  RB_YELLOW=""
28+  RB_GREEN=""
29+  RB_BLUE=""
30+  RB_INDIGO=""
31+  RB_VIOLET=""
32+
33   RED=""
34   GREEN=""
35   YELLOW=""
36@@ -40,13 +55,12 @@ fi
37 printf "${BLUE}%s${NORMAL}\n" "Updating Oh My Zsh"
38 if git pull --rebase --stat origin master
39 then
40-  printf '%s' "$GREEN"
41-  printf '%s\n' '         __                                     __   '
42-  printf '%s\n' '  ____  / /_     ____ ___  __  __   ____  _____/ /_  '
43-  printf '%s\n' ' / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \ '
44-  printf '%s\n' '/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / / '
45-  printf '%s\n' '\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/  '
46-  printf '%s\n' '                        /____/                       '
47+  printf '%s         %s__      %s           %s        %s       %s     %s__   %s\n' $RB_RED $RB_ORANGE $RB_YELLOW $RB_GREEN $RB_BLUE $RB_INDIGO $RB_VIOLET $RB_RESET
48+  printf '%s  ____  %s/ /_    %s ____ ___  %s__  __  %s ____  %s_____%s/ /_  %s\n' $RB_RED $RB_ORANGE $RB_YELLOW $RB_GREEN $RB_BLUE $RB_INDIGO $RB_VIOLET $RB_RESET
49+  printf '%s / __ \%s/ __ \  %s / __ `__ \%s/ / / / %s /_  / %s/ ___/%s __ \ %s\n' $RB_RED $RB_ORANGE $RB_YELLOW $RB_GREEN $RB_BLUE $RB_INDIGO $RB_VIOLET $RB_RESET
50+  printf '%s/ /_/ /%s / / / %s / / / / / /%s /_/ / %s   / /_%s(__  )%s / / / %s\n' $RB_RED $RB_ORANGE $RB_YELLOW $RB_GREEN $RB_BLUE $RB_INDIGO $RB_VIOLET $RB_RESET
51+  printf '%s\____/%s_/ /_/ %s /_/ /_/ /_/%s\__, / %s   /___/%s____/%s_/ /_/  %s\n' $RB_RED $RB_ORANGE $RB_YELLOW $RB_GREEN $RB_BLUE $RB_INDIGO $RB_VIOLET $RB_RESET
52+  printf '%s    %s        %s           %s /____/ %s       %s     %s          %s\n' $RB_RED $RB_ORANGE $RB_YELLOW $RB_GREEN $RB_BLUE $RB_INDIGO $RB_VIOLET $RB_RESET
53   printf "${BLUE}%s\n" "Hooray! Oh My Zsh has been updated and/or is at the current version."
54   printf "${BLUE}${BOLD}%s${RESET}\n" "To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh"
55   printf "${BLUE}${BOLD}%s${RESET}\n" "Get your Oh My Zsh swag at: https://shop.planetargon.com/collections/oh-my-zsh"