Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
colored bash output - last try
  • Loading branch information
jakoch committed Sep 24, 2012
1 parent af5d5d8 commit 4d8683e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions build-tools/checkEncodingUTF8.sh
Expand Up @@ -18,9 +18,8 @@ function checkDirectory() {
if [ -f ${name} ]; then
charset=`file -bi ${name} | grep -o 'utf-8'`
if [ 'utf-8' != "${charset}" ]; then
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
file -bi ${name} | grep -v 'charset=utf-8' | xargs echo -e "\e[00;31m ${name} is encoded in"
echo -e " \e[00m"
fi
elif [ -d ${name} ]; then
checkDirectory ${name}
Expand Down

0 comments on commit 4d8683e

Please sign in to comment.