2015-03-27 23:45:38 +00:00
|
|
|
|
# vim: set ts=3 sw=3 noet ft=sh : bash
|
|
|
|
|
|
|
|
|
|
color() {
|
|
|
|
|
[ -n "$use_color" ] && echo -n "[0;${1:-0}m"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
lecho() {
|
|
|
|
|
if [ -n "$LIBRETRO_LOG_SUPER" ]; then
|
|
|
|
|
echo "$@" >> $super_log
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LIBRETRO_LOG_DIR="${LIBRETRO_LOG_DIR:-$WORKDIR/log}"
|
2015-03-28 02:10:01 +00:00
|
|
|
|
LIBRETRO_LOG_CORE="${LIBRETRO_LOG_CORE:-%s.log}"
|
|
|
|
|
LIBRETRO_LOG_SUPER="${LIBRETRO_LOG_SUPER:-libretro-super.log}"
|
2015-03-27 23:45:38 +00:00
|
|
|
|
if [ -n "$LIBRETRO_LOG_SUPER" ]; then
|
|
|
|
|
super_log="$LIBRETRO_LOG_DIR/$LIBRETRO_LOG_SUPER"
|
|
|
|
|
fi
|
2015-03-28 01:31:51 +00:00
|
|
|
|
# Core log can't be handled here
|
|
|
|
|
|
|
|
|
|
mkdir -p "$LIBRETRO_LOG_DIR"
|
2015-03-27 23:45:38 +00:00
|
|
|
|
|
2015-03-28 01:31:51 +00:00
|
|
|
|
if [[ -n $FORCE_COLOR || -t 1 && -z "$NO_COLOR" ]]; then
|
2015-03-27 23:45:38 +00:00
|
|
|
|
want_color=1
|
|
|
|
|
use_color=1
|
|
|
|
|
else
|
|
|
|
|
want_color=""
|
|
|
|
|
use_color=""
|
|
|
|
|
fi
|