From 975243e3c5196e6f48521c1f6cc2cbe7857921d4 Mon Sep 17 00:00:00 2001 From: 00tiagopolicarpo00 Date: Sat, 23 Oct 2021 22:04:51 +0100 Subject: [PATCH] Update 49-imt.sh update codigo em falta --- scripts/49-imt.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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