[maps] extracting google maps version

It should not fail in case of lost connection or corrupted maps.xml file
Fix #187
This commit is contained in:
Gautier Hattenberger
2012-09-06 15:50:05 +02:00
parent c3f6bb70d1
commit 2bff89cf4d
2 changed files with 6 additions and 8 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ $(DATADIR)/maps.google.com: $(DATADIR) FORCE
$(PAPARAZZI_HOME)/conf/maps.xml: $(DATADIR)/maps.google.com
$(Q)echo "<!DOCTYPE maps SYSTEM \"maps.dtd\">" > $(@)
$(Q)echo "" >> $(@)
$(Q)echo "<maps google_version=\""`grep -P "http://khm[0-9]+.google.com/kh/v=[0-9]+.x26" $(DATADIR)/maps.google.com | sed -E s#.*http://khm[0-9]+.google.com/kh/v=## | sed -E s#.x26.*##`"\"/>" >> $(@)
$(Q)echo "<maps google_version=\""`grep -P "http://khm[0-9]+.google.com/kh/v=[0-9]+.x26" $(DATADIR)/maps.google.com | sed -E 's#.*http://khm[0-9]+.google.com/kh/v=##;s#.x26.*##'`"\"/>" >> $(@)
$(Q)echo "" >> $(@)
FORCE: