osm-garmin: various
parent
ec42a5634a
commit
8a2cafd2ee
|
@ -49,26 +49,13 @@ function build_gmap() {
|
|||
if [[ $build == "true" ]]; then
|
||||
cd "$build_dir"
|
||||
|
||||
family_name="osm-garmin"
|
||||
|
||||
[[ -n $OSMGARMIN_MAP_FAMILY_NAME ]] && family_name="$OSMGARMIN_MAP_FAMILY_NAME"
|
||||
|
||||
description="$(echo "${region##*/}" | sed -e "s/-/ /g" | sed -e "s/\b\(.\)/\u\1/g" | sed -e "s/ /-/g")"
|
||||
product_id="$region_id"
|
||||
product_version="$version_id"
|
||||
|
||||
exec_mkgmap \
|
||||
--description="$(echo "${region##*/}" | sed -e "s/-/ /g" | sed -e "s/\b\(.\)/\u\1/g" | sed -e "s/ /-/g")" \
|
||||
--add-pois-to-areas \
|
||||
--area-name="$region" \
|
||||
--bounds="$bounds_dir" \
|
||||
--description="$description" \
|
||||
--family-name="$family_name" \
|
||||
--product-id="$product_id" \
|
||||
--product-version="$product_version" \
|
||||
--series-name="$family_name" \
|
||||
--gmapsupp \
|
||||
--index \
|
||||
--route \
|
||||
--gmapsupp \
|
||||
$tiles_dir/$region_shortname/6324*.osm.pbf \
|
||||
"$styles_dir/$style.TYP"
|
||||
|
||||
|
@ -150,7 +137,8 @@ is_updates="false"
|
|||
|
||||
[[ $OSMGARMIN_FORCE_BUILD == "true" ]] && is_updates="true"
|
||||
|
||||
for region in $regions_array; do
|
||||
if [[ $OSMGARMIN_SKIP_UPDATE_MAPS != "true" ]]; then
|
||||
for region in $regions_array; do
|
||||
if [[ "$(check_osm_region_exists "$region")" == "true" ]]; then
|
||||
if [[ "$(check_osm_update "$region")" == "true" ]]; then
|
||||
echo "🌍 Updating OSM map: $region"
|
||||
|
@ -166,11 +154,16 @@ for region in $regions_array; do
|
|||
else
|
||||
echo "⚠️ Region \"$region\" does not exist"
|
||||
fi
|
||||
done
|
||||
done
|
||||
else
|
||||
is_updates="true"
|
||||
fi
|
||||
|
||||
if [[ $is_updates == "true" ]]; then
|
||||
if [[ $OSMGARMIN_SKIP_UPDATE_BOUNDS != "true" ]]; then
|
||||
echo "📒 Updating bounds..."
|
||||
update_bounds
|
||||
fi
|
||||
|
||||
region_id=1
|
||||
|
||||
|
|
|
@ -13,14 +13,7 @@ function wait() {
|
|||
|
||||
while :
|
||||
do
|
||||
regions="europe/great-britain"
|
||||
style=""
|
||||
first_run="true"
|
||||
|
||||
[[ -n "$OSMGARMIN_REGIONS" ]] && regions="$OSMGARMIN_REGIONS"
|
||||
[[ -n "$OSMGARMIN_STYLE" ]] && style="$OSMGARMIN_STYLE"
|
||||
|
||||
/app/build-gmap.sh "$regions" "$style"
|
||||
/app/build-gmap.sh "$OSMGARMIN_REGIONS" "$OSMGARMIN_STYLE"
|
||||
|
||||
if [[ $? == 0 ]]; then
|
||||
wait $sleep_time
|
||||
|
|
Loading…
Reference in New Issue