diff options
| author | TitanSnow <[email protected]> | 2017-04-23 21:10:02 +0800 |
|---|---|---|
| committer | TitanSnow <[email protected]> | 2017-04-23 21:10:02 +0800 |
| commit | c79f19923138e47269bea7285802d13eaf7f7bf9 (patch) | |
| tree | d33408662b72ec158f79f7f44ed7ac25d15147e8 /scripts | |
| parent | cd091cdab9d7211c7bd079cbfa0babfda154771a (diff) | |
add colors
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/get.sh | 23 |
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 |
