Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpolden/echoip.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantonc42 <antonc42@users.noreply.github.com>2019-01-04 18:56:16 +0300
committerantonc42 <antonc42@users.noreply.github.com>2019-01-04 18:56:16 +0300
commite1e6dba31b34d2094d5b9fd8cc12781e5145e110 (patch)
tree380400c05858e831a1d6a1e4888c398cf314380a
parentc623168acb6a00ae8c8ba5447c23c0993dc3d5bc (diff)
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'.
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ff84404..ff5000e 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,7 @@ databases := GeoLite2-City GeoLite2-Country
$(databases):
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-Country.mmdb || mv data/GeoLite2-Country.mmdb data/country.mmdb