Commit e4c3583a0da221be3db2e68539e14b28d5ca6496

Thomas de Grivel 2023-02-14T14:05:36

VERBOSE_KEEP_GOING

diff --git a/bin/shpkg_ci b/bin/shpkg_ci
index 5d9c009..a43a674 100755
--- a/bin/shpkg_ci
+++ b/bin/shpkg_ci
@@ -15,7 +15,7 @@ logs2html () (
             verbose 1 ansi2html "$F"
         fi
     done
-    verbose 1 mv ~/www/log/"${SHPKG_OS}"/txt/*.html ~/www/log/"${SHPKG_OS}"/html/ || true
+    verbose -k 1 mv ~/www/log/"${SHPKG_OS}"/txt/*.html ~/www/log/"${SHPKG_OS}"/html/
 )
 
 main () {
diff --git a/share/shpkg/shpkg.subr b/share/shpkg/shpkg.subr
index a9bd1fe..2676730 100644
--- a/share/shpkg/shpkg.subr
+++ b/share/shpkg/shpkg.subr
@@ -37,13 +37,23 @@ verbose__puts () {
 }
 
 verbose () {
+    if [ "x$1" = "x-k" ]; then
+        VERBOSE_KEEP_GOING=Yes
+        shift
+    else
+        VERBOSE_KEEP_GOING=No
+    fi
     if [ "x$1" = "x-n" ]; then
         shift
         verbose__puts "$@"
     else
         verbose__puts "$@"
         shift
-        "$@"
+        if [ "x${VERBOSE_KEEP_GOING}" = "xYes" ]; then
+            "$@" || true
+        else
+            "$@"
+        fi
     fi
 }