#!/bin/bash set -uo pipefail BASE=/home/rafa/joomla-migration/mirror-antiguo RUN=$(cat "$BASE/CURRENT_RUN") D=$BASE/runs/$RUN L=$D/logs/wget-anterior.log echo "wget vivo: $(pgrep -cf 'anterior/$')" echo "descargados OK: $(grep -c '^2026.*URL:' "$L")" echo "404: $(grep -c 'ERROR 404' "$L")" echo "ficheros bajo /anterior: $(find "$D/raw/antiguo.feadulta.com/anterior" -type f 2>/dev/null | wc -l)" echo "ficheros bajo /es/anterior (redirigidos, no deberia haber): $(find "$D/raw/antiguo.feadulta.com/es/anterior" -type f 2>/dev/null | wc -l)" du -sh "$D/raw/antiguo.feadulta.com/anterior" 2>/dev/null echo "--- ultimas 5 descargas OK ---" grep '^2026.*URL:' "$L" | tail -5 | sed 's/\(.\{140\}\).*/\1/'