1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: misc/output/parse-config
3 # Copyright (C) 2004 - 2023 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
13 . misc/output/terminal
18 for x in $( ls misc/output ); do
19 if [ -f misc/output/$x/functions.in ]; then
20 eval "y=\$SDECFG_OUTPUT_$( echo $x | tr a-z A-Z )"
22 . misc/output/$x/functions.in
28 while read -r type data; do
29 # always output to the terminal
30 for plugin in terminal $plugins; do
31 eval "echo_${type}_${plugin} $data"
37 if [ -z "$SDE_OUPUT_PLUGIN_PROC_ACTIVE" ]; then
38 export SDE_OUPUT_PLUGIN_PROC_ACTIVE=1
40 # since the output plugin's stdin is the pipe, we help it out
41 # with the columns for pretty printing output
42 [ "${columns:=$COLUMNS}" ] || columns="$( stty size 2> /dev/null | cut -d' ' -f2 )"
43 [ "$columns" ] || columns=80
44 exec 199> >( output_proc $columns )
48 local request="$1" tag; shift
51 # add each argument, seperated in quotes, after newlines and
52 # tick quotes got escaped
57 request="$request \$'$tag'"
63 echo_header() { echo_sched header "$@"; }
64 echo_status() { echo_sched status "$@"; }
65 echo_warning() { echo_sched warning "$@"; }
66 echo_error() { echo_sched error "$@"; }
67 echo_pkg_deny() { echo_sched pkg_deny "$@"; }
68 echo_pkg_start() { echo_sched pkg_start "$@"; }
69 echo_pkg_finish() { echo_sched pkg_finish "$@"; }
70 echo_pkg_abort() { echo_sched pkg_abort "$@"; }
71 echo_errorquote() { echo_sched errorquote "$@"; }