Commit fa5824e893ecbeaab32ef494446bf510f9640796

Thomas de Grivel 2023-02-15T22:39:25

wip

diff --git a/bin/shpkg_ci b/bin/shpkg_ci
index 2ef45ce..0c3c257 100755
--- a/bin/shpkg_ci
+++ b/bin/shpkg_ci
@@ -85,6 +85,17 @@ logs2html () {
     done
 }
 
+status2png () {
+    for F in "${SHPKG_CI_STATUS_DIR}"/*.status; do
+        STATUS="$(cat "$F")"
+        I="${SHPKG_CI_STATUS_DIR}/$(basename "$F" .status).png"
+        if ! [ -f "$I" ] ||
+                [ "$F" -nt "$I" ]; then
+            cp "${SHPKG_DIR}/share/shpkg/img/status_${STATUS}.64.png" "$I"
+        fi
+    done
+}
+
 main () {
     verbose 2 shpkg_ci_status "shpkg_ci.status" running
     for SHPKG_REPO; do
@@ -125,6 +136,7 @@ main () {
               fi; )
             if verbose 1 cp -p "${SHPKG_REPO_BUILD_DIR}/var/log/shpkg/tags/${SHPKG_REPO}".*.log "${SHPKG_CI_LOG_DIR}"; then
                 verbose 2 logs2html
+                verbose 2 status2png
             fi
         fi
         ( verbose 2 shpkg_bootstrap -f "${SHPKG_REPO_BUILD_DIR}"; )
@@ -151,10 +163,12 @@ main () {
         fi
         if [ "x${SHPKG_CI_COPY}" = "xYes" ]; then
             verbose 2 logs2html
+            verbose 2 status2png
         fi
     done
     verbose 2 shpkg_ci_status "shpkg_ci.status" ok
     verbose 2 logs2html
+    verbose 2 status2png
 }
 
 if [ "x$1" = "x--clean" ]; then