From 4ffa8b82314590334826a8a9dea378e97584542b Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Fri, 28 Feb 2025 05:04:49 -0700 Subject: [PATCH] VARA Downloader - Updated VARA HF and FM install scripts to use a more robust application download method --- .../skel/add-ons/wine/02-install-vara-hf.sh | 21 +++++------------- .../skel/add-ons/wine/03-install-vara-fm.sh | 22 +++++-------------- 2 files changed, 12 insertions(+), 31 deletions(-) diff --git a/overlay/etc/skel/add-ons/wine/02-install-vara-hf.sh b/overlay/etc/skel/add-ons/wine/02-install-vara-hf.sh index 7592ddc..2b90f1c 100755 --- a/overlay/etc/skel/add-ons/wine/02-install-vara-hf.sh +++ b/overlay/etc/skel/add-ons/wine/02-install-vara-hf.sh @@ -2,28 +2,19 @@ # # Author : Gaston Gonzalez # Date : 20 January 2025 -# Updated : 1 February 2025 +# Updated : 28 February 2025 # Purpose : Install VARA HF -set -e source ./common-checks.sh -VERSION="4.8.9" -DOWNLOAD_FILE="vara-hf-${VERSION}.zip" -URL="https://downloads.winlink.org/VARA%20Products/VARA%20HF%20v${VERSION}%20setup.zip" VARA_HOME="${HOME}/.wine32/drive_c/VARA" +VARA_PATTERN="VARA%20HF" -et-log "Installing VARA HF..." +./vara-downloader.sh "${VARA_PATTERN}" +[[ $? -ne 0 ]] && et-log "Error downloading VARA HF" && exit 1 -if [ ! -e ${DOWNLOAD_FILE} ]; then - et-log "Downloading VARA HF ${version} from ${URL}" - curl -s -f -L -o ${DOWNLOAD_FILE} "${URL}" -fi - -if [ $? -ne 0 ]; then - et-log "Error downloading VARA HF ${VERSION}." - exit 1 -fi +DOWNLOAD_FILE=$(ls *.zip | grep "${VARA_PATTERN}") +[[ ! -e "${DOWNLOAD_FILE}" ]] && et-log "VARA download file not found" && exit 1 unzip -o ${DOWNLOAD_FILE} diff --git a/overlay/etc/skel/add-ons/wine/03-install-vara-fm.sh b/overlay/etc/skel/add-ons/wine/03-install-vara-fm.sh index f2d2598..7fb6da1 100755 --- a/overlay/etc/skel/add-ons/wine/03-install-vara-fm.sh +++ b/overlay/etc/skel/add-ons/wine/03-install-vara-fm.sh @@ -2,28 +2,18 @@ # # Author : Gaston Gonzalez # Date : 20 January 2025 -# Updated : 1 February 2025 +# Updated : 28 February 2025 # Purpose : Install VARA FM -set -e source ./common-checks.sh -VERSION="4.3.8" -DOWNLOAD_FILE="vara-fm-${VERSION}.zip" -URL="https://downloads.winlink.org/VARA%20Products/VARA%20FM%20v${VERSION}%20setup.zip" -VARA_HOME="${HOME}/.wine32/drive_c/VARA FM" +VARA_PATTERN="VARA%20FM" -et-log "Installing VARA FM..." +./vara-downloader.sh "${VARA_PATTERN}" +[[ $? -ne 0 ]] && et-log "Error downloading VARA FM" && exit 1 -if [ ! -e ${DOWNLOAD_FILE} ]; then - et-log "Downloading VARA FM ${version} from ${URL}" - curl -s -f -L -o ${DOWNLOAD_FILE} "${URL}" -fi - -if [ $? -ne 0 ]; then - et-log "Error downloading VARA FM ${VERSION}." - exit 1 -fi +DOWNLOAD_FILE=$(ls *.zip | grep "${VARA_PATTERN}") +[[ ! -e "${DOWNLOAD_FILE}" ]] && et-log "VARA download file not found" && exit 1 unzip -o ${DOWNLOAD_FILE}