diff --git a/script/conflate_osm.sh b/script/conflate_osm.sh index c54e730..5877a61 100755 --- a/script/conflate_osm.sh +++ b/script/conflate_osm.sh @@ -10,7 +10,8 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ); # ---- pbf2json ---- # location of pbf2json binary -PBF2JSON_BIN=${PBF2JSON_BIN:-"$DIR/../node_modules/pbf2json/build/pbf2json.linux-x64"}; +PBF2JSON_FILENAME=$(node -e "console.log(require('util').format('pbf2json.%s-%s', os.platform(), os.arch()))") +PBF2JSON_BIN=${PBF2JSON_BIN:-"$DIR/../node_modules/pbf2json/build/$PBF2JSON_FILENAME"}; # ensure pbf2json exists and is executable if [[ ! -f $PBF2JSON_BIN || ! -x $PBF2JSON_BIN ]]; then