From 4990acb6d767b42930f29985fa29f381d00fa34c Mon Sep 17 00:00:00 2001 From: Marcos Marado Date: Mon, 19 Nov 2018 22:03:53 +0000 Subject: [PATCH] Depending on wget version, failure can be 1 or 2 Since success is always 0, check if result is greater than zero instead. --- scripts/17-saude-cert.sh | 2 +- scripts/25-autarquicas.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/17-saude-cert.sh b/scripts/17-saude-cert.sh index 7ac4c58..bcc4d55 100755 --- a/scripts/17-saude-cert.sh +++ b/scripts/17-saude-cert.sh @@ -1,6 +1,6 @@ #!/bin/bash -if [ ! "$(wget https://www.min-saude.pt/ -o -|grep cert|wc -l)" -eq "1" ]; then +if [ ! "$(wget https://www.min-saude.pt/ -o -|grep cert|wc -l)" -gt "0" ]; then echo "certificado min-saude: incumprimento pode já não existir"; else echo "certificado min-saude: Incumprimento mantém-se, a actualizar o README (faça um git diff, valide, e commit!)"; diff --git a/scripts/25-autarquicas.sh b/scripts/25-autarquicas.sh index e458469..8f65f60 100755 --- a/scripts/25-autarquicas.sh +++ b/scripts/25-autarquicas.sh @@ -2,7 +2,7 @@ maybeOK=0; -if [ ! "$(wget https://www.autarquicas2017.mai.gov.pt/ -o -|grep cert|wc -l)" -eq "1" ]; then +if [ ! "$(wget https://www.autarquicas2017.mai.gov.pt/ -o -|grep cert|wc -l)" -gt "0" ]; then echo "certificado autarquicas: incumprimento pode já não existir"; maybeOK=1; fi