mirror of https://github.com/mpolden/echoip
changed env var in makefile to builtin var
makefile was using the environment variable PWD. this can be problematic if using 'sudo' as the PWD variable is not passed through. however GNU make has a builtin CURDIR variable for the current working directory that does work with 'sudo'.
This commit is contained in:
parent
c623168acb
commit
e1e6dba31b
2
Makefile
2
Makefile
|
@ -26,7 +26,7 @@ databases := GeoLite2-City GeoLite2-Country
|
||||||
|
|
||||||
$(databases):
|
$(databases):
|
||||||
mkdir -p data
|
mkdir -p data
|
||||||
curl -fsSL -m 30 https://geolite.maxmind.com/download/geoip/database/$@.tar.gz | tar $(TAR_OPTS) --strip-components=1 -C $(PWD)/data -xzf - '*.mmdb'
|
curl -fsSL -m 30 https://geolite.maxmind.com/download/geoip/database/$@.tar.gz | tar $(TAR_OPTS) --strip-components=1 -C $(CURDIR)/data -xzf - '*.mmdb'
|
||||||
test ! -f data/GeoLite2-City.mmdb || mv data/GeoLite2-City.mmdb data/city.mmdb
|
test ! -f data/GeoLite2-City.mmdb || mv data/GeoLite2-City.mmdb data/city.mmdb
|
||||||
test ! -f data/GeoLite2-Country.mmdb || mv data/GeoLite2-Country.mmdb data/country.mmdb
|
test ! -f data/GeoLite2-Country.mmdb || mv data/GeoLite2-Country.mmdb data/country.mmdb
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue