summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTitanSnow <[email protected]>2017-04-23 21:10:02 +0800
committerTitanSnow <[email protected]>2017-04-23 21:10:02 +0800
commitc79f19923138e47269bea7285802d13eaf7f7bf9 (patch)
treed33408662b72ec158f79f7f44ed7ac25d15147e8 /scripts
parentcd091cdab9d7211c7bd079cbfa0babfda154771a (diff)
add colors
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/get.sh23
1 files changed, 15 insertions, 8 deletions
diff --git a/scripts/get.sh b/scripts/get.sh
index a53c00558..f41c2b118 100755
--- a/scripts/get.sh
+++ b/scripts/get.sh
@@ -4,14 +4,16 @@
# usage: bash <(curl -s <my location>) [branch]
# print a LOGO!
-echo ' _'
-echo ' | | _'
-echo '__ ___ ______| |/ /___'
-echo '\ \/ | \ / / _ | / / __ \'
-echo ' \ /| \/ / / | | | __/'
-echo ' / \| \__/\ \_| \ \ \ \__.'
+echo -ne '\x1b[07m'
+echo ' _ '
+echo ' | | _ '
+echo '__ ___ ______| |/ /___ '
+echo '\ \/ | \ / / _ | / / __ \ '
+echo ' \ /| \/ / / | | | __/ '
+echo ' / \| \__/\ \_| \ \ \ \__. '
echo '/_/\_|_| |_\___\_\|\_\__/ getter'
-echo -e '\n'
+echo ' '
+echo -e '\x1b[0m'
brew --version >/dev/null 2>&1 && brew install --HEAD xmake && xmake --version && exit
if [ 0 -ne $(id -u) ]
@@ -22,7 +24,12 @@ else
fi
my_exit(){
rv=$?
- if [ "x$1" != x ];then echo "$1";fi
+ if [ "x$1" != x ]
+ then
+ echo -ne '\x1b[41;37m'
+ echo "$1"
+ echo -ne '\x1b[0m'
+ fi
rm -rf /tmp/$$xmake_getter 2>/dev/null
if [ "x$2" != x ]
then