2024-01-27 19:04:46 +00:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
DISTRO=$(grep -m 1 '^ID=' /etc/os-release | cut -f2 -d= | tr -d '"')
|
|
|
|
DISTRO_VER=$(grep '^VERSION_ID' /etc/os-release | tr -d '"' | cut -f2 -d= | cut -f1 -d.)
|
|
|
|
|
|
|
|
INSTALL_SCRIPT="geohelm-${DISTRO}-${DISTRO_VER}.sh"
|
2024-01-31 12:58:05 +00:00
|
|
|
URL_BASE="https://git.acugis.com/AcuGIS/GeoHelm/raw/branch/main/scripts"
|
2024-01-27 19:04:46 +00:00
|
|
|
|
|
|
|
if [ -f /usr/bin/wget ]; then
|
|
|
|
wget -q "${URL_BASE}/${INSTALL_SCRIPT}"
|
|
|
|
wget -q -P/tmp "${URL_BASE}/build-ssl.sh"
|
|
|
|
elif [ -f /usr/bin/curl ]; then
|
|
|
|
curl --silent ${URL_BASE}/${INSTALL_SCRIPT} > ${INSTALL_SCRIPT}
|
|
|
|
curl --silent ${URL_BASE}/build-ssl.sh > '/tmp/build-ssl.sh'
|
|
|
|
else
|
|
|
|
echo "Error: No downloader (wget or curl)";
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f "${INSTALL_SCRIPT}" ]; then
|
|
|
|
chmod +x ./${INSTALL_SCRIPT} /tmp/build-ssl.sh
|
|
|
|
./${INSTALL_SCRIPT}
|
|
|
|
else
|
|
|
|
echo 'Your distribution is not supported!'
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|