*.sh: POSIX compliance when needed
This commit is contained in:
4
thirdparty/fetch-geoip-db.sh
vendored
4
thirdparty/fetch-geoip-db.sh
vendored
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
# Die on any error for Travis CI to automatically retry:
|
||||
set -e
|
||||
@@ -10,7 +10,7 @@ cd "${download_dir}"
|
||||
filename="GeoLite2-Country.mmdb.gz"
|
||||
|
||||
# Database does not exist or is older than 30 days.
|
||||
if [[ ! -e $filename ]] || [[ -n $(find . -name $filename -mtime +30 -print) ]]; then
|
||||
if [ ! -e $filename ] || [ -n "$(find . -name $filename -mtime +30 -print)" ]; then
|
||||
rm -f $filename
|
||||
echo "Updating GeoIP country database from MaxMind."
|
||||
curl -s -L -O http://geolite.maxmind.com/download/geoip/database/$filename
|
||||
|
||||
Reference in New Issue
Block a user