osm-garmin: various
parent
aa80a9ddaf
commit
bd59fa38d8
|
@ -23,10 +23,6 @@ function build_gmap() {
|
||||||
build="true"
|
build="true"
|
||||||
build_failed="false"
|
build_failed="false"
|
||||||
|
|
||||||
if [[ -n "$style" ]]; then
|
|
||||||
style="$styles_dir/$style.TYP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "$generated_map_dir"
|
mkdir -p "$generated_map_dir"
|
||||||
|
|
||||||
if [[ -f "$version_path" ]]; then
|
if [[ -f "$version_path" ]]; then
|
||||||
|
@ -44,7 +40,8 @@ function build_gmap() {
|
||||||
--gmapsupp \
|
--gmapsupp \
|
||||||
--index \
|
--index \
|
||||||
--route \
|
--route \
|
||||||
$tiles_dir/$region_shortname/6324*.osm.pbf $style
|
$tiles_dir/$region_shortname/6324*.osm.pbf \
|
||||||
|
"$styles_dir/$style.TYP"
|
||||||
|
|
||||||
[[ $? != 0 ]] && build_failed="true"
|
[[ $? != 0 ]] && build_failed="true"
|
||||||
cd "$cwd"
|
cd "$cwd"
|
||||||
|
@ -118,6 +115,9 @@ mkdir -p "$out_dir"
|
||||||
mkdir -p "$tiles_dir"
|
mkdir -p "$tiles_dir"
|
||||||
|
|
||||||
regions_array="$(echo $regions | tr ";" "\n")"
|
regions_array="$(echo $regions | tr ";" "\n")"
|
||||||
|
is_updates="false"
|
||||||
|
|
||||||
|
[[ $OSMGARMIN_FORCE_BUILD == "true" ]] && is_updates="true"
|
||||||
|
|
||||||
for region in $regions_array; do
|
for region in $regions_array; do
|
||||||
if [[ "$(check_osm_region_exists "$region")" == "true" ]]; then
|
if [[ "$(check_osm_region_exists "$region")" == "true" ]]; then
|
||||||
|
@ -127,13 +127,17 @@ for region in $regions_array; do
|
||||||
|
|
||||||
echo "✂️ Building tiles: $region"
|
echo "✂️ Building tiles: $region"
|
||||||
update_tiles "$region"
|
update_tiles "$region"
|
||||||
|
|
||||||
|
[[ $is_updates == "false" ]] && is_updates="true"
|
||||||
|
else
|
||||||
|
echo "⚠️ No updates to \"$region\""
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "⚠️ Region \"$region\" does not exist"
|
echo "⚠️ Region \"$region\" does not exist"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# TODO: Don't update this if there wasn't any updates
|
if [[ $is_updates == "true" ]]; then
|
||||||
echo "📒 Updating bounds..."
|
echo "📒 Updating bounds..."
|
||||||
update_bounds
|
update_bounds
|
||||||
|
|
||||||
|
@ -143,6 +147,9 @@ for region in $regions_array; do
|
||||||
build_gmap "$region" "$style"
|
build_gmap "$region" "$style"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
else
|
||||||
|
echo "⚠️ No new maps. Not building (set $$OSMGARMIN_FORCE_BUILD=true to override)"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "🧹 Cleaning up..."
|
echo "🧹 Cleaning up..."
|
||||||
cleanup
|
cleanup
|
|
@ -15,6 +15,7 @@ while :
|
||||||
do
|
do
|
||||||
regions="europe/great-britain"
|
regions="europe/great-britain"
|
||||||
style=""
|
style=""
|
||||||
|
first_run="true"
|
||||||
|
|
||||||
[[ -n "$OSMGARMIN_REGIONS" ]] && regions="$OSMGARMIN_REGIONS"
|
[[ -n "$OSMGARMIN_REGIONS" ]] && regions="$OSMGARMIN_REGIONS"
|
||||||
[[ -n "$OSMGARMIN_STYLE" ]] && style="$OSMGARMIN_STYLE"
|
[[ -n "$OSMGARMIN_STYLE" ]] && style="$OSMGARMIN_STYLE"
|
||||||
|
|
Loading…
Reference in New Issue