2015-02-26 08:14:05 +00:00
|
|
|
# vim: set ts=3 sw=3 noet ft=sh : bash
|
|
|
|
|
|
|
|
echo_cmd() {
|
|
|
|
eval 'echo "$@"'
|
|
|
|
eval "$@"
|
|
|
|
return $?
|
|
|
|
}
|
2015-03-03 08:13:02 +00:00
|
|
|
|
|
|
|
color() {
|
|
|
|
[ -n "$NO_COLOR" ] && return
|
|
|
|
|
|
|
|
echo -ne "\e[0;${1:-0}m"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -t 1 ]; then
|
|
|
|
if [ -z "$FORCE_COLOR" ]; then
|
|
|
|
NO_COLOR=1
|
|
|
|
fi
|
|
|
|
fi
|