Skip to content

Commit

Permalink
\e is not universally understood as an escape sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
denisa authored and jinghaomiao committed Jan 3, 2019
1 parent 31b5f23 commit 6a79875
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/apollo_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@

APOLLO_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"

BOLD='\033[1m'
RED='\033[0;31m'
YELLOW='\e[33m'
GREEN='\033[32m'
WHITE='\033[34m'
YELLOW='\033[33m'
NO_COLOR='\033[0m'

function info() {
(>&2 echo -e "[\e[34m\e[1mINFO\e[0m] $*")
(>&2 echo -e "[${WHITE}${BOLD}INFO${NO_COLOR}] $*")
}

function error() {
Expand All @@ -35,7 +38,7 @@ function warning() {
}

function ok() {
(>&2 echo -e "[\e[32m\e[1m OK \e[0m] $*")
(>&2 echo -e "[${GREEN}${BOLD} OK ${NO_COLOR}] $*")
}

function print_delim() {
Expand Down

0 comments on commit 6a79875

Please sign in to comment.