GA: extra debug for mai and covid scripts

Is wget failing on these scripts? If so, how? Let's have the output
printed (in cases of failure).
This commit is contained in:
Marcos Marado 2023-07-04 18:37:25 +01:00
parent bfe5910a77
commit 482fdbb0ac
2 changed files with 4 additions and 0 deletions

View File

@ -7,6 +7,8 @@ if [ ! "$(diff mai scripts/14/mai|wc -l)" -eq "0" ]; then
echo "DEBUG: mai-tmp:"
cat mai-tmp
echo "EOF"
echo "EXTRA DEBUG:"
wget --no-check-certificate https://www.sg.mai.gov.pt/AdministracaoEleitoral/RecenseamentoEleitoral/ResultadosRecenseamento/Paginas/default.aspx && cat default.aspx && rm default.aspx
else
echo "mai: Incumprimento mantém-se, a actualizar o README (faça um git diff, valide, e commit!)";
while IFS='' read -r line || [[ -n "$line" ]]; do

View File

@ -7,6 +7,8 @@ nnxls=$(echo "$urls"|grep -v ^$|grep -c -v xlsx);
if [ "$nurls" -eq "0" ]; then
echo "covid: não foram encontrados urls, script não deve estar a funcionar correctamente.";
echo "DEBUG:"
wget https://covid19.min-saude.pt/numero-de-novos-casos-e-obitos-por-dia/ && cat index.html && rm index.html
elif [ "$nnxls" -ne "0" ]; then
echo "covid: há ($nnxls/$nurls) endereços que não são xlsx, incumprimento pode já não existir";
echo "DEBUG: ";