2
0
Fork 0
containerfiles/osm-garmin/app/daemon.sh

24 lines
626 B
Bash

#!/usr/bin/env bash
. /app/utils.sh
while :
do
regions="europe/great-britain"
style=""
[[ -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"
# TODO: Tear this apart so we can update the maps and bounds separately,
# then build all the maps afterwards (less wasteful!)
fi
done
sleep 3600
done