Commit 58cd4cec329ba7c2ef148c7b31f5e8c0ac8b5fa1

Thomas de Grivel 2023-02-15T12:47:28

wip shpkg_ci

diff --git a/bin/shpkg_ci b/bin/shpkg_ci
index aaa773b..714723a 100755
--- a/bin/shpkg_ci
+++ b/bin/shpkg_ci
@@ -21,7 +21,7 @@ if [ "x$1" = "x--upgrade" ]; then
 fi
 
 log_status () {
-    STATUS_FILE="${SHPKG_CI_STATUS_DIR}/$(basename "$1" .log).status"
+    STATUS_FILE="$(log_status_file "$1")"
     if [ -f "${STATUS_FILE}" ]; then
         cat "${STATUS_FILE}"
     else
@@ -30,6 +30,10 @@ log_status () {
     fi
 }
 
+log_status_file () {
+    echo "${SHPKG_CI_STATUS_DIR}/$(basename "$1" .log).status"
+}
+
 log2html () {
     {
         TITLE="$(echo "$1" | ansi2html)"
@@ -71,7 +75,11 @@ EOF
 
 logs2html () {
     for F in "${SHPKG_CI_LOG_DIR}"/"${SHPKG_REPO}".*.log; do
-        if ! [ -f "$F.html" ] || [ "$F" -nt "$F.html" ] || [ "$0" -nt "$F.html" ]; then
+        STATUS_FILE="$(log_status_file "$F")"
+        if ! [ -f "$F.html" ] ||
+                [ "$F" -nt "$F.html" ] ||
+                [ "${STATUS_FILE}" -nt "$F.html" ] ||
+                [ "$0" -nt "$F.html" ]; then
             verbose 2 log2html "$F"
         fi
     done