mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
mbutil - Initial support for installing mb-util to support offline map tilesets
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 24 April 2025
|
# Date : 24 April 2025
|
||||||
|
# Upated : 25 April 2025
|
||||||
# Purpose : Install mbtileserver
|
# Purpose : Install mbtileserver
|
||||||
set -e
|
set -e
|
||||||
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
|
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
|
||||||
@@ -11,7 +12,6 @@ trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR
|
|||||||
APP=mbtileserver
|
APP=mbtileserver
|
||||||
VERSION=0.11.0
|
VERSION=0.11.0
|
||||||
DOWNLOAD_FILE="${APP}_v${VERSION}_linux_amd64.zip"
|
DOWNLOAD_FILE="${APP}_v${VERSION}_linux_amd64.zip"
|
||||||
BIN_FILE=QtTermTCP
|
|
||||||
INSTALL_DIR="/opt/${APP}-${VERSION}"
|
INSTALL_DIR="/opt/${APP}-${VERSION}"
|
||||||
INSTALL_BIN_DIR="${INSTALL_DIR}/bin"
|
INSTALL_BIN_DIR="${INSTALL_DIR}/bin"
|
||||||
LINK_PATH="/opt/${APP}"
|
LINK_PATH="/opt/${APP}"
|
||||||
|
|||||||
Executable
+40
@@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 25 April 2025
|
||||||
|
# Purpose : Install mbutil to allow for creation of offline tilesets
|
||||||
|
set -e
|
||||||
|
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
|
||||||
|
trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR
|
||||||
|
|
||||||
|
. ./env.sh
|
||||||
|
|
||||||
|
APP=mbutil
|
||||||
|
VERSION=0.3.0
|
||||||
|
DOWNLOAD_FILE="${APP}-${VERSION}.tar.gz"
|
||||||
|
SRC_DIR="${ET_SRC_DIR}/${APP}-${VERSION}"
|
||||||
|
INSTALL_DIR="/opt/${APP}-${VERSION}"
|
||||||
|
INSTALL_BIN_DIR="${INSTALL_DIR}/bin"
|
||||||
|
LINK_PATH="/opt/${APP}"
|
||||||
|
|
||||||
|
et-log "Installing ${APP} ${VERSION}..."
|
||||||
|
|
||||||
|
if [[ ! -e "${ET_DIST_DIR}/${DOWNLOAD_FILE}" ]]; then
|
||||||
|
|
||||||
|
URL="https://github.com/mapbox/mbutil/archive/refs/tags/v${VERSION}.tar.gz"
|
||||||
|
|
||||||
|
et-log "Downloading ${APP}: ${URL}"
|
||||||
|
curl -s -L -o ${DOWNLOAD_FILE} --fail ${URL}
|
||||||
|
|
||||||
|
mv ${DOWNLOAD_FILE} ${ET_DIST_DIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
CWD_DIR=`pwd`
|
||||||
|
|
||||||
|
et-log "Unpacking ${APP} ${VERSION} source..."
|
||||||
|
tar -xzf "${ET_DIST_DIR}/${DOWNLOAD_FILE}"
|
||||||
|
mv "${APP}-${VERSION}" ${ET_SRC_DIR} && cd ${SRC_DIR}
|
||||||
|
|
||||||
|
et-log "Installing ${APP} ${VERSION} globally..."
|
||||||
|
python setup.py install
|
||||||
|
|
||||||
|
cd $CWD_DIR
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 25 April 2025
|
||||||
|
# Purpose : Installs Python 3
|
||||||
|
set -e
|
||||||
|
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
|
||||||
|
trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR
|
||||||
|
|
||||||
|
et-log "Installing Python 2..."
|
||||||
|
|
||||||
|
apt install \
|
||||||
|
python2 \
|
||||||
|
python-setuptools \
|
||||||
|
-y
|
||||||
|
|
||||||
|
# Set Python 2 as the default
|
||||||
|
update-alternatives --install /usr/bin/python python /usr/bin/python2 1
|
||||||
+5
-3
@@ -2,8 +2,8 @@
|
|||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 16 March 2024
|
# Date : 16 March 2024
|
||||||
# Updated : 24 April 2025
|
# Updated : 25 April 2025
|
||||||
# Purpose : Main installer for EmComm Tools OS Community
|
# Purpose : Main installer for EmComm Tools Community (ETC)
|
||||||
|
|
||||||
. ./env.sh
|
. ./env.sh
|
||||||
. ./functions.sh
|
. ./functions.sh
|
||||||
@@ -61,5 +61,7 @@ exitIfNotRoot
|
|||||||
|
|
||||||
./install-wine.sh
|
./install-wine.sh
|
||||||
|
|
||||||
# Install GIS applications
|
# Install GIS applications and dependencies
|
||||||
./install-mbtileserver.sh
|
./install-mbtileserver.sh
|
||||||
|
./install-python.sh
|
||||||
|
./install-mbutil.sh
|
||||||
|
|||||||
Executable
+7
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 25 April 2025
|
||||||
|
# Purpose : Test mb-util installation
|
||||||
|
|
||||||
|
OUT=$(which mb-util)
|
||||||
|
exit $?
|
||||||
Executable
+7
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 25 November 2025
|
||||||
|
# Purpose : Test Python installation
|
||||||
|
|
||||||
|
OUT=$(python --version 2>&1 | grep "2.7")
|
||||||
|
exit $?
|
||||||
Reference in New Issue
Block a user