diff options
author | googol42 | 2022-07-06 14:08:42 +0200 |
---|---|---|
committer | googol42 | 2022-07-06 14:08:42 +0200 |
commit | 16e0e9c888cc6354b133efb1225c4a6b2fcf441c (patch) | |
tree | ae30d63fcadd4525532bb87cc7dc3f9f5029740c | |
parent | 69265d164f76fb927711ef3a442136eb041e3267 (diff) | |
download | aur-16e0e9c888cc6354b133efb1225c4a6b2fcf441c.tar.gz |
adapt script that it also works correctly when the website is down
-rwxr-xr-x | check-and-update-new-version.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/check-and-update-new-version.sh b/check-and-update-new-version.sh index 18db62f5a46e..1c5cfb1251f2 100755 --- a/check-and-update-new-version.sh +++ b/check-and-update-new-version.sh @@ -4,6 +4,11 @@ touch lastVersion lastVersion=`cat lastVersion` currentVersion=`curl https://www.mkgmap.org.uk/download/mkgmap.html --silent | grep "Download mkgmap release" | sed -rn 's/.*([[:digit:]][[:digit:]][[:digit:]][[:digit:]]).*/\1/p'` +if [ -z "${currentVersion}" ]; then + echo "mkgmap.org.uk is down or the version number could not be parsed" + exit 0 +fi + if [ "${lastVersion}" = "${currentVersion}" ]; then exit 0 fi |