Skip to content

Commit

Permalink
Getting google maps version dynamically and writing it to conf/maps_d…
Browse files Browse the repository at this point in the history
…ata/version
  • Loading branch information
rbdavison authored and flixr committed Jun 19, 2011
1 parent 776383a commit 161d758
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -46,6 +46,7 @@
/conf/control_panel.xml
/conf/%gconf.xml
/conf/srtm_data/*
/conf/maps_data/*

# /doc/pprz_algebra/
/doc/pprz_algebra/headfile.log
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Expand Up @@ -227,7 +227,7 @@ cleanspaces:
distclean : dist_clean
dist_clean : clean
rm -r conf/srtm_data

rm -r conf/maps_data

ab_clean:
find sw/airborne -name '*~' -exec rm -f {} \;
Expand All @@ -248,8 +248,10 @@ sw/simulator/launchsitl:
cat src/$(@F) | sed s#OCAMLRUN#$(OCAMLRUN)# | sed s#OCAML#$(OCAML)# > $@
chmod a+x $@

#.SUFFIXES: .hgt.zip
#.SUFFIXES: .hgt.zip .jpg

%.hgt.zip:
cd data/srtm; $(MAKE) $(@)

%.jpg:
cd data/maps; $(MAKE) $(@)
13 changes: 13 additions & 0 deletions data/maps/Makefile
@@ -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.*## > $(@)

0 comments on commit 161d758

Please sign in to comment.