2024-11-03 09:38:38 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
# Author : Gaston Gonzalez
|
|
|
|
|
# Date : 3 November 2024
|
2025-11-12 18:14:13 -07:00
|
|
|
# Updated : 12 November 2024
|
2024-11-03 09:38:38 -07:00
|
|
|
# Purpose : Install YAAC
|
2025-11-12 18:14:13 -07:00
|
|
|
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
|
|
|
|
|
. ../overlay/opt/emcomm-tools/bin/et-common
|
2024-11-03 09:38:38 -07:00
|
|
|
|
|
|
|
|
VERSION=latest
|
|
|
|
|
ZIP_FILE=YAAC.zip
|
|
|
|
|
INSTALL_DIR=/opt/yaac-${VERSION}
|
|
|
|
|
LINK_PATH=/opt/yaac
|
|
|
|
|
|
|
|
|
|
et-log "Installing YAAC..."
|
|
|
|
|
|
2024-11-07 14:00:37 -07:00
|
|
|
URL=https://www.ka2ddo.org/ka2ddo/${ZIP_FILE}
|
2024-11-03 09:38:38 -07:00
|
|
|
|
2024-11-07 14:00:37 -07:00
|
|
|
et-log "Downloading YAAC: ${URL}"
|
2025-11-12 18:14:13 -07:00
|
|
|
download_with_retries ${URL} ${ZIP_FILE}
|
2024-11-03 09:38:38 -07:00
|
|
|
|
2024-11-07 14:00:37 -07:00
|
|
|
mv -v ${ZIP_FILE} ${ET_DIST_DIR}
|
2024-11-03 09:38:38 -07:00
|
|
|
|
|
|
|
|
CWD_DIR=$(pwd)
|
|
|
|
|
|
|
|
|
|
if [ ! -e ${INSTALL_DIR} ]; then
|
|
|
|
|
mkdir -v ${INSTALL_DIR} && cd ${INSTALL_DIR}
|
|
|
|
|
unzip ${ET_DIST_DIR}/${ZIP_FILE}
|
|
|
|
|
else
|
|
|
|
|
et-log "${INSTALL_DIR} already exists."
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
[ -e ${LINK_PATH} ] && rm ${LINK_PATH}
|
|
|
|
|
ln -s ${INSTALL_DIR} ${LINK_PATH}
|
|
|
|
|
|
|
|
|
|
cd ${CWD_DIR}
|