yaac version checking

This commit is contained in:
tb14
2025-06-30 21:09:05 -05:00
parent 4fb70f56d2
commit b240af7a54
+19 -6
View File
@@ -343,12 +343,6 @@ else
JS8CALLVER="NOT INSTALLED"
fi
if hash yaac 2>/dev/null; then
YAACVER="INSTALLED"
else
YAACVER="NOT INSTALLED"
fi
if hash libreoffice 2>/dev/null; then
LIBREVER="INSTALLED"
else
@@ -406,6 +400,16 @@ else
VOACAPLVER="NOT INSTALLED"
fi
if [ -f $HOME/Radio/Packet/YAAC/*.txt ]; then
YAACVER=$(ls $HOME/Radio/Packet/YAAC/v* | awk -F 'YAAC/v' '{print $2}' | awk -F '.txt' '{print $1}' )
else
if hash yaac 2>/dev/null; then
YAACVER="UNABLE TO DETERMINE"
else
YAACVER="NOT INSTALLED"
fi
fi
if [ -f $HOME/Radio/ARDOP/*.txt ]; then
ARDOPCFVER=$(ls $HOME/Radio/ARDOP/v* | awk -F 'ARDOP/v' '{print $2}' | awk -F '.txt' '{print $1}' )
else
@@ -528,6 +532,8 @@ if [[ $NEWVOACAPL == "" ]]; then
NEWVOACAPL="SERVER DOWN"
fi
NEWYAACVER=$(curl -sI https://www.ka2ddo.org/ka2ddo/YAAC.zip | grep -i Last-Modified | sed -E 's/Last-Modified: (.*)/\1/' | xargs -I{} date -d "{}" +%d%b%Y)
echo -e ${ACTION} "90% Complete"${NOCOLOR}
#NEWVC=$(curl -s https://www.veracrypt.fr/en/Downloads.html | sed -n 's/<h3>Latest\ Stable\ Release\ //p' | awk -F '(' '{print $1}' | sed 's/-\ //' | sed 's/\ //' )
@@ -2548,6 +2554,9 @@ function direwolf_install() {
function yaac_install() {
if [[ ${YAACVER} == ${NEWYAACVER} ]]; then
echo "YAAC is already at the most current version"
else
wget -P $PACKETDIR -N https://www.ka2ddo.org/ka2ddo/YAAC.zip ||
{ ERRCODE="Failed to download YAAC"; errors; return; }
@@ -2560,6 +2569,9 @@ sudo apt-get -y install openjdk-11-jre librxtx-java unzip ||
unzip -o -d $PACKETDIR/YAAC $PACKETDIR/YAAC.zip ||
{ ERRCODE="Failed to unzip YAAC"; errors; return; }
touch $PACKETDIR/YAAC/v$NEWYAACVER.txt ||
{ ERRCODE="Failed to make YAAC Version date marker" }
if ! hash yaac; then
cat > $PACKETDIR/yaac <<EOF
@@ -2573,6 +2585,7 @@ chmod +x $PACKETDIR/yaac && sudo mv $PACKETDIR/yaac /usr/local/bin/yaac ||
{ ERRCODE="Failed to create launcher for YAAC in /usr/local/bin/"; errors; return; }
fi
fi
}