summaryrefslogtreecommitdiffstats
path: root/recipes-demo/navigation
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-demo/navigation')
-rw-r--r--recipes-demo/navigation/ondemandnavi-config_1.0.bb7
1 files changed, 5 insertions, 2 deletions
diff --git a/recipes-demo/navigation/ondemandnavi-config_1.0.bb b/recipes-demo/navigation/ondemandnavi-config_1.0.bb
index 212971f26..644102ed3 100644
--- a/recipes-demo/navigation/ondemandnavi-config_1.0.bb
+++ b/recipes-demo/navigation/ondemandnavi-config_1.0.bb
@@ -11,11 +11,14 @@ SRC_URI = "file://naviconfig.ini \
inherit allarch
-MAPBOX_ACCESS_TOKEN ?= "Please set mapbox access token"
+MAPBOX_ACCESS_TOKEN ?= ""
do_compile[noexec] = "1"
do_install () {
install -D -m 644 ${WORKDIR}/naviconfig.ini ${D}${sysconfdir}/naviconfig.ini
- sed -i -e 's/MAPBOX_ACCESS_TOKEN/${MAPBOX_ACCESS_TOKEN}/' ${D}${sysconfdir}/naviconfig.ini
+ if [ -n "${MAPBOX_ACCESS_TOKEN}" ]; then
+ sed -i -e 's/MAPBOX_ACCESS_TOKEN/${MAPBOX_ACCESS_TOKEN}/;s/\("enableOSM":\)true/\1false/' \
+ ${D}${sysconfdir}/naviconfig.ini
+ fi
}