diff --git a/scripts/ci-report.sh b/scripts/ci-report.sh index 1e833ed..9cc1dd7 100644 --- a/scripts/ci-report.sh +++ b/scripts/ci-report.sh @@ -17,18 +17,16 @@ if [ ! -d "$REPORT_DIR" ]; then exit 1 fi -cd "$REPORT_DIR" - FILES=() while IFS= read -r -d '' f; do FILES+=("$(basename "$f")") -done < <(find . -maxdepth 1 -type f ! -name index.html -print0 2>/dev/null || true) +done < <(find "$REPORT_DIR" -maxdepth 1 -type f ! -name index.html -print0 2>/dev/null || true) SUBDIRS=() while IFS= read -r -d '' d; do - name="${d#./}" - [ -f "$name/index.html" ] && SUBDIRS+=("$name") -done < <(find . -maxdepth 1 -type d ! -name . -print0 2>/dev/null || true) + name="${d#$REPORT_DIR/}" + [ -f "$d/index.html" ] && SUBDIRS+=("$name") +done < <(find "$REPORT_DIR" -maxdepth 1 -type d ! -name . -print0 2>/dev/null || true) TOTAL=$(( ${#FILES[@]} + ${#SUBDIRS[@]} )) @@ -61,26 +59,26 @@ generate_index() { html+="