#!/bin/bash set -uo pipefail BASE=/home/rafa/joomla-migration/mirror-antiguo RUN=$(cat "$BASE/CURRENT_RUN") D=$BASE/runs/$RUN echo "inicio/fin pase B:"; cat "$D/logs/passB.start" "$D/logs/passB.end" 2>/dev/null || echo "(sin marcas)" echo "assets pedidos: $(wc -l < "$D/assets-input.txt")" echo "errores:"; grep -hoE 'ERROR [0-9]+' "$D/logs"/wget-a-*.log 2>/dev/null | sort | uniq -c echo "descargados segun log: $(grep -hc '^2026' "$D/logs"/wget-a-*.log 2>/dev/null | paste -sd+ | bc)" echo "ficheros totales: $(find "$D/raw" -type f | wc -l)" du -sh "$D/raw" echo "--- reparto por tipo en raw ---" find "$D/raw" -type f | sed 's#.*\.##' | tr 'A-Z' 'a-z' | sort | uniq -c | sort -rn | head -15