diff options
author | Tim Yamin <plasmaroo@gentoo.org> | 2004-03-21 16:20:26 +0000 |
---|---|---|
committer | Tim Yamin <plasmaroo@gentoo.org> | 2004-03-21 16:20:26 +0000 |
commit | a8b01f062d0808f300308e9232b60097363d9f4d (patch) | |
tree | c630a1d22a5c2cda0febe5530f1f6d4f1dfa607a /gen_funcs.sh | |
parent | Removing broken 1.00-pre8 busybox. (diff) | |
download | genkernel-a8b01f062d0808f300308e9232b60097363d9f4d.tar.gz genkernel-a8b01f062d0808f300308e9232b60097363d9f4d.tar.bz2 genkernel-a8b01f062d0808f300308e9232b60097363d9f4d.zip |
Version bump. Closes bugs #34948, #37371, #41129, #41166, #42725, #42815,
#44127, #44556, and #44601.
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@98 67a159dc-881f-0410-a524-ba9dfbe2cb84
Diffstat (limited to 'gen_funcs.sh')
-rwxr-xr-x | gen_funcs.sh | 63 |
1 files changed, 48 insertions, 15 deletions
diff --git a/gen_funcs.sh b/gen_funcs.sh index b7fd72a7..d177a818 100755 --- a/gen_funcs.sh +++ b/gen_funcs.sh @@ -25,23 +25,23 @@ isTrue() { if isTrue ${USECOLOR} then # COLS="`stty size 2> /dev/null`" -# COLS="`getcols ${COLS}`" -# COLS=$((${COLS} - 7)) -# ENDCOL=$'\e[A\e['${COLS}'G' # Now, ${ENDCOL} will move us to the end of the +# COLS="`getcols ${COLS}`" +# COLS=$((${COLS} - 7)) +# ENDCOL=$'\e[A\e['${COLS}'G' # Now, ${ENDCOL} will move us to the end of the # column; irregardless of character width GOOD=$'\e[32;01m' WARN=$'\e[33;01m' BAD=$'\e[31;01m' NORMAL=$'\e[0m' - HILITE=$'\e[36;01m' - BRACKET=$'\e[34;01m' + BOLD=$'\e[0;01m' + UNDER=$'\e[4m' else GOOD="" WARN="" BAD="" NORMAL="" - HILITE="" - BRACKET="" + BOLD="" + UNDER="" fi @@ -124,11 +124,16 @@ print_info() { # STRUCTURE DATA TO BE OUTPUT TO FILE, AND OUTPUT IT if [ "${SCRPRINT}" -eq "1" -o "${FORCEFILE}" -eq "1" ] then + STRR=${2//${WARN}/} + STRR=${STRR//${BAD}/} + STRR=${STRR//${BOLD}/} + STRR=${STRR//${NORMAL}/} + if [ "${PREFIXLINE}" = "1" ] then - STR="* ${2}" + STR="* ${STRR}" else - STR="${2}" + STR="${STRR}" fi if [ "${NEWLINE}" = "0" ] @@ -142,6 +147,16 @@ print_info() { return 0 } +print_error() +{ + GOOD=${BAD} print_info "$@" +} + +print_warning() +{ + GOOD=${WARN} print_info "$@" +} + # var_replace(var_name, var_value, string) # $1 = variable name # $2 = variable value @@ -163,13 +178,31 @@ clear_log() { gen_die() { if [ "$#" -gt "0" ] then - print_info 1 "gen_die(): ${1}" + print_error 1 "ERROR: ${1}" + fi + echo + print_info 1 "-- Grepping log... --" + echo + + if isTrue ${USECOLOR} + then + GREP_COLOR="1" grep -B5 -E --colour=always "([Ww][Aa][Rr][Nn][Ii][Nn][Gg]|[Ee][Rr][Rr][Oo][Rr][ :,!]|[Ff][Aa][Ii][Ll][Ee]?[Dd]?)" ${DEBUGFILE} + else + grep -B5 -E "([Ww][Aa][Rr][Nn][Ii][Nn][Gg]|[Ee][Rr][Rr][Oo][Rr][ :,!]|[Ff][Aa][Ii][Ll][Ee]?[Dd]?)" ${DEBUGFILE} fi - print_info 1 "Please see ${DEBUGFILE} for more info on failures" - print_info 1 "" - print_info 1 "DO NOT REPORT KERNEL COMPILE FAILURES AS GENKERNEL BUGS!" - print_info 1 "" - print_info 1 "Report real genkernel bugs to bugs.gentoo.org" + echo + print_info 1 "-- End log... --" + echo + print_info 1 "Please consult ${DEBUGFILE} for more information and any" + print_info 1 "errors that were reported above." + echo + print_info 1 "Report any real genkernel bugs to bugs.gentoo.org and" + print_info 1 "assign your bug to genkernel@gentoo.org. Please include" + print_info 1 "as much information as you can in your bug report; attaching" + print_info 1 "${DEBUGFILE} so that your issue can be dealt with effectively." + print_info 1 '' + print_info 1 "DO ${BAD}NOT${NORMAL} REPORT KERNEL COMPILE FAILURES AS GENKERNEL BUGS!" + print_info 1 '' exit 1 } |