7
0
mirror of https://github.com/marado/RNID.git synced 2024-12-27 06:10:21 +00:00
rnid/scripts/16-saude.sh

17 lines
758 B
Bash
Raw Normal View History

2018-05-26 15:32:21 +00:00
#!/bin/bash
# XXX: pode haver outro incumprimento com o certificado HTTPS, verificar
2018-05-26 15:32:21 +00:00
# https://www.iefp.pt/ - não cumpre WCAG 2.0 AA
if [ "$(wget --no-check-certificate https://servicos.min-saude.pt/utente/ -o /dev/null -O - | grep "<img" |grep -c "alt=\"\"")" -eq "0" ]; then
2018-05-26 15:32:21 +00:00
echo "servicos min-saude: incumprimento pode já não existir";
else
echo "servicos min-saude: Incumprimento mantém-se, a actualizar o README (faça um git diff, valide, e commit!)";
while IFS='' read -r line || [[ -n "$line" ]]; do
test $(echo "$line"|grep -v servicos.min-saude|wc -l) -eq "1" \
&& echo "$line" \
|| (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t");
done < README.md > new
mv new README.md
fi