2023-09-26 03:13:31 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
. /app/utils.sh
|
|
|
|
|
|
|
|
while :
|
|
|
|
do
|
2023-09-26 04:12:12 +02:00
|
|
|
regions="europe/great-britain"
|
|
|
|
style=""
|
2023-09-26 03:13:31 +02:00
|
|
|
|
|
|
|
[[ -n "$OSMGARMIN_REGIONS" ]] && regions="$OSMGARMIN_REGIONS"
|
|
|
|
[[ -n "$OSMGARMIN_STYLE" ]] && style="$OSMGARMIN_STYLE"
|
|
|
|
|
|
|
|
regions_array="$(echo $regions | tr ";" "\n")"
|
|
|
|
|
|
|
|
for region in $regions_array; do
|
|
|
|
if [[ "$(check_osm_update "$region")" == "true" ]]; then
|
|
|
|
/app/build-gmap.sh "$region" "$style"
|
2023-09-26 04:41:53 +02:00
|
|
|
# TODO: Tear this apart so we can update the maps and bounds separately,
|
|
|
|
# then build all the maps afterwards (less wasteful!)
|
2023-09-26 03:13:31 +02:00
|
|
|
fi
|
|
|
|
done
|
2023-09-26 04:41:53 +02:00
|
|
|
|
|
|
|
sleep 3600
|
2023-09-26 03:13:31 +02:00
|
|
|
done
|