Skip to content

Commit

Permalink
colored bash output - second try
Browse files Browse the repository at this point in the history
  • Loading branch information
jakoch committed Sep 24, 2012
1 parent 5d23d4e commit af5d5d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build-tools/checkEncodingUTF8.sh
Expand Up @@ -18,7 +18,9 @@ function checkDirectory() {
if [ -f ${name} ]; then
charset=`file -bi ${name} | grep -o 'utf-8'`
if [ 'utf-8' != "${charset}" ]; then
file -bi ${name} | grep -v 'charset=utf-8' | xargs echo -e "\E[31;40m ${name} is encoded in"
echo -e "\033[01;31m " # color output red on black
file -bi ${name} | grep -v 'charset=utf-8' | xargs echo "${name} is encoded in"
echo -e "\033[00;00m " # reset color back to gray on black
fi
elif [ -d ${name} ]; then
checkDirectory ${name}
Expand Down

0 comments on commit af5d5d8

Please sign in to comment.