POC fonctionnel

This commit is contained in:
2017-02-09 21:53:24 +01:00
parent 38d236e09b
commit 2375dd6571
25 changed files with 279 additions and 470 deletions

23
lib/buildtools/tamarin_log Executable file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Colors
COLOR_INFO='\e[0;36m'
COLOR_ERROR='\e[0;31m'
COLOR_WARN='\e[0;33m'
COLOR_SUCCESS='\e[0;32m'
COLOR_DEBUG='\e[0;35m'
function log {
local args=( $@ )
local color=COLOR_${args[0]}
echo -e "${!color}[${args[0]}] $(remove_ansi ${args[@]:1})\e[0m"
}
function remove_ansi {
echo "$@" | sed 's,\x1B\[[0-9;]*[a-zA-Z],,g'
}
if [ $# -ne 0 ]; then
log $@
fi