diff --git a/scripts/49-imt.sh b/scripts/49-imt.sh index 32bdab1..4ca0046 100644 --- a/scripts/49-imt.sh +++ b/scripts/49-imt.sh @@ -38,6 +38,18 @@ fi ## 23/10/2021: there are empty alts emptyalt=$(curl -k -L https://servicos.imt-ip.pt/ | hxclean | hxselect -s '\n' img | hxselect -s '\n' -c 'img::attr(alt)'|grep -c ^$); if [ "$emptyalt" -ne "0" ]; then - echo "imt: problemas de acessibilidade"; + echo "imtonline: problemas de acessibilidade"; fail=3; fi + +if [ "$fail" = 0 ]; then + echo "imtonline: incumprimento pode já não existir"; +else + echo "imtonline: 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 imt|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