Skip to content

Commit

Permalink
Merge branch 'develop' into colors
Browse files Browse the repository at this point in the history
  • Loading branch information
niXman committed Jan 29, 2017
2 parents 4b32f90 + 0fdcd00 commit e4c82e4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions build
Expand Up @@ -97,6 +97,7 @@ readonly RUN_ARGS="$@"
echo " --short-output - reduce output by not printing skipped subtargets"
echo " --logviewer-command - use this command for the log viewer"
echo " --no-colors - disable colorized output, useful when logging to a file"
echo " --wait-for-logviewer - wait until after logviewer completes, e.g. for echo"
echo " available Python versions: 2, 3"
echo " available clang versions: 3.4, git"
echo " available gcc versions:"
Expand Down Expand Up @@ -283,6 +284,7 @@ while [[ $# > 0 ]]; do
COLOR_PKG_NAME=""
COLOR_STATUS=""
;;
--wait-for-logviewer) LOGVIEWER_WAIT=yes ;;
*)
die "bad command line: \"$1\". terminate."
;;
Expand Down
1 change: 1 addition & 0 deletions library/config.sh
Expand Up @@ -193,6 +193,7 @@ echo "done"
# **************************************************************************

LOGVIEWER=
LOGVIEWER_WAIT=no

func_find_logviewer \
LOGVIEWERS[@] \
Expand Down
11 changes: 9 additions & 2 deletions library/functions.sh
Expand Up @@ -96,13 +96,20 @@ function die {
# $2 - exit code
local _retcode=1
[[ -n $2 ]] && _retcode=$2
echo $1
echo
>&2 echo $1
exit $_retcode
}

function func_show_log {
# $1 - log file
[[ $SHOW_LOG_ON_ERROR == yes ]] && $LOGVIEWER $1 &
[[ $SHOW_LOG_ON_ERROR == yes ]] && {
[[ $LOGVIEWER_WAIT == yes ]] && {
$LOGVIEWER $1
} || {
$LOGVIEWER $1 &
}
}
}

# **************************************************************************
Expand Down

0 comments on commit e4c82e4

Please sign in to comment.