From 8fe051fb2900ffcb95b48d8493a348423f22fa29 Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Sun, 6 Jul 2025 13:47:42 -0700 Subject: [PATCH] mbtileserver - Added downloader for pre-rendered US and CA map tiles --- scripts/download-et-maps.sh | 31 +++++++++++++++++++++++++++++++ scripts/install.sh | 5 ++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100755 scripts/download-et-maps.sh diff --git a/scripts/download-et-maps.sh b/scripts/download-et-maps.sh new file mode 100755 index 0000000..058f7d6 --- /dev/null +++ b/scripts/download-et-maps.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Author : Gaston Gonzalez +# Date : 6 July 2025 +# Purpose : Downloads pre-rendered raster map tiles in mbtile format + +BASE_URL="https://github.com/thetechprepper/emcomm-tools-os-community/releases/download" +RELEASE="emcomm-tools-os-community-20250401-r4-final-4.0.0" +TILESET_DIR="/etc/skel/.local/share/emcomm-tools/mbtileserver/tilesets" + +OPTIONS=( + "us" "United States" + "ca" "Canada" +) + +SELECTED_COUNTRY=$(dialog --clear --menu "Select a country" 15 40 5 "${OPTIONS[@]}" 2>&1 >/dev/tty) +EXIT_STATUS=$? + +tput sgr 0 && clear + +if [[ $EXIT_STATUS -eq 0 ]]; then + DOWNLOAD_FILE="osm-${SELECTED_COUNTRY}-zoom0to10-20250703.mbtiles" + DOWNLOAD_URL="${BASE_URL}/${RELEASE}/${DOWNLOAD_FILE}" + + if [[ ! -e ${DOWNLOAD_FILE} ]]; then + et-log "Downloading ${DOWNLOAD_URL}" + curl -L -f -o ${DOWNLOAD_FILE} ${DOWNLOAD_URL} + fi + + et-log "Moving ${DOWNLOAD_FILE} ${TILESET_DIR}" + mv -v ${DOWNLOAD_FILE} ${TILESET_DIR} +fi diff --git a/scripts/install.sh b/scripts/install.sh index c44aa48..879ddde 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 16 March 2024 -# Updated : 4 June 2025 +# Updated : 6 July 2025 # Purpose : Main installer for EmComm Tools Community (ETC) . ./env.sh @@ -73,3 +73,6 @@ exitIfNotRoot # Install SDR tools ./install-sdr-tools.sh ./install-dump1090.sh + +# Install ETC application maps +./download-et-maps.sh