„gaboshlib/g_runcmd.bashfunc“ ändern
This commit is contained in:
1 parent
2d0c91979b
commit
18bd919a2e
1 file changed
+4
@@ -1,9 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
function g_runcmd {
|
function g_runcmd {
|
||||||
|
|
||||||
|
g_echo "running $@"
|
||||||
$@ >$g_tmp/g_runcmd-output 2>&1
|
$@ >$g_tmp/g_runcmd-output 2>&1
|
||||||
g_runcmd_exitcode=$?
|
g_runcmd_exitcode=$?
|
||||||
|
|
||||||
|
g_echo "running $@"
|
||||||
|
|
||||||
if egrep -q -i "warn|error|fail|fatal" $g_tmp/g_runcmd-output
|
if egrep -q -i "warn|error|fail|fatal" $g_tmp/g_runcmd-output
|
||||||
then
|
then
|
||||||
g_echo_warn "$@:
|
g_echo_warn "$@:
|
||||||
|
|||||||
Reference in new issue
Block a user