[BOOT] Print functions for debugging

This commit is contained in:
2016-07-29 23:07:29 +02:00
parent df86be2973
commit d149d4d20a
17 changed files with 450 additions and 31 deletions

14
util/colorize.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
function ce()
{
echo -e "${@}"
}
while read line; do
echo "$line" | sed \
-e "s/^\[\(INFO\)\]/\[$(ce \\033[36m)\1$(ce \\033[0m)\]/" \
-e "s/^\[\(OK\)\]/\[$(ce \\033[32m)\1$(ce \\033[0m)\]/" \
-e "s/^\[\(WARNING\)\]/\[$(ce \\033[33m)\1$(ce \\033[0m)\]/" \
-e "s/^\[\(ERROR\)\]/\[$(ce \\033[31m)\1$(ce \\033[0m)\]/"
done