scripts: nova validacao - scripts/12-autentic.sh

This commit is contained in:
Marcos Marado 2018-05-20 18:44:06 +01:00
parent e434a4a3c8
commit 58ea5d6fde
2 changed files with 1571 additions and 0 deletions

17
scripts/12-autentic.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
# https://autenticacao.gov.pt/fa/ajuda/autenticacaogovpt.aspx - pagina com informacao sobre o plugin
wget https://autenticacao.gov.pt/fa/ajuda/autenticacaogovpt.aspx -o /dev/null -O autenticacaogovpt.aspx
if [ ! "$(diff autenticacaogovpt.aspx scripts/12/autenticacaogovpt.aspx|wc -l)" -eq "0" ]; then
echo "autenticação: incumprimento pode já não existir";
else
echo "autenticação: 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 autenticacao|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
rm autenticacaogovpt.aspx

File diff suppressed because it is too large Load Diff