Getting google maps version dynamically and writing it to conf/maps_data/version

This commit is contained in:
Bernard Davison
2011-06-19 23:05:00 +10:00
committed by Felix Ruess
parent 776383af8c
commit 161d758ec0
3 changed files with 18 additions and 2 deletions
+13
View File
@@ -0,0 +1,13 @@
DATADIR = $(PAPARAZZI_HOME)/conf/maps_data
Q=@
all: $(DATADIR)/index $(DATADIR)/version
$(DATADIR):
mkdir $(DATADIR)
$(DATADIR)/index: $(DATADIR)
$(@)wget -O $(@) http://maps.google.com/
$(DATADIR)/version: $(DATADIR)/index
$(Q)grep -P "http://khm[0-9]+.google.com/kh/v=[0-9]+.x26" $(DATADIR)/index | sed -E s#.*http://khm[0-9]+.google.com/kh/v=## | sed -E s#.x26.*## > $(@)