From 2d0c91979bada584f4311ddbfffa674245c27d85 Mon Sep 17 00:00:00 2001 From: olli Date: Thu, 1 Dec 2022 12:35:51 +0100 Subject: [PATCH] nicer output --- gaboshlib/g_runcmd.bashfunc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gaboshlib/g_runcmd.bashfunc b/gaboshlib/g_runcmd.bashfunc index fa5876b..84eaadb 100644 --- a/gaboshlib/g_runcmd.bashfunc +++ b/gaboshlib/g_runcmd.bashfunc @@ -6,12 +6,15 @@ function g_runcmd { if egrep -q -i "warn|error|fail|fatal" $g_tmp/g_runcmd-output then - g_echo_warn "$@: $(cat $g_tmp/g_runcmd-output)" + g_echo_warn "$@: +$(cat $g_tmp/g_runcmd-output)" elif [ $g_runcmd_exitcode -eq 0 ] then - g_echo_ok "$@: $(cat $g_tmp/g_runcmd-output)" + g_echo_ok "$@: +$(cat $g_tmp/g_runcmd-output)" else - g_echo_error "$@: $(cat $g_tmp/g_runcmd-output)" + g_echo_error "$@: +$(cat $g_tmp/g_runcmd-output)" fi return $g_runcmd_exitcode }