added warning
This commit is contained in:
parent
beb0535f03
commit
96dcd7e684
@ -3,7 +3,11 @@
|
|||||||
function g_runcmd {
|
function g_runcmd {
|
||||||
$@ >$g_tmp/g_runcmd-output 2>&1
|
$@ >$g_tmp/g_runcmd-output 2>&1
|
||||||
g_runcmd_exitcode=$?
|
g_runcmd_exitcode=$?
|
||||||
if [ $g_runcmd_exitcode -eq 0 ]
|
|
||||||
|
if egrep -q -i "warn|error|fail|fatal" $g_tmp/g_runcmd-output
|
||||||
|
then
|
||||||
|
g_echo_warn "$@: $(cat $g_tmp/g_runcmd-output)"
|
||||||
|
elif [ $g_runcmd_exitcode -eq 0 ]
|
||||||
then
|
then
|
||||||
g_echo_ok "$@: $(cat $g_tmp/g_runcmd-output)"
|
g_echo_ok "$@: $(cat $g_tmp/g_runcmd-output)"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user