diff --git a/AmRRON-Setup-Script.sh b/AmRRON-Setup-Script.sh index 52f6733..a26c3b6 100755 --- a/AmRRON-Setup-Script.sh +++ b/AmRRON-Setup-Script.sh @@ -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/

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 <