mirror of
https://github.com/marado/RNID.git
synced 2024-12-22 03:54:21 +00:00
novo teste: scripts/14-mai.sh
This commit is contained in:
parent
a63997fd46
commit
742f4d3208
14
scripts/14-mai.sh
Executable file
14
scripts/14-mai.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
wget https://www.sg.mai.gov.pt/AdministracaoEleitoral/RecenseamentoEleitoral/ResultadosRecenseamento/Paginas/default.aspx -o /dev/null -O -|grep -v __REQUESTDIGEST|grep -v VIEWSTATE > mai
|
||||
if [ ! "$(diff mai scripts/14/mai|wc -l)" -eq "0" ]; then
|
||||
echo "mai: incumprimento pode já não existir";
|
||||
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
|
||||
test $(echo "$line"|grep -v sg.mai|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 mai
|
779
scripts/14/mai
Normal file
779
scripts/14/mai
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user