From d50129fd7ed072b4088bf3d669c533f732f90932 Mon Sep 17 00:00:00 2001 From: KM4ACK Date: Fri, 29 Jan 2021 11:43:06 -0600 Subject: [PATCH] update xastir version check --- update | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/update b/update index 5498349..d62a494 100755 --- a/update +++ b/update @@ -458,12 +458,17 @@ fi #----------------------------------------------------# # XASTIR #----------------------------------------------------# -XA="/usr/bin/xastir" -if [ ! -f "$XA" ]; then -XASTIR="Not Installed" -else -XASTIR="Installed" -fi +LATESTXAS=$(curl -s https://github.com/Xastir/Xastir | grep Release- | head -1 | sed 's/.*Release-//;s/">//') +CURRENTXAS=$(xastir -V | sed 's/Xastir V//;s/(.*//;/^\s*$/d') + + if (( $(echo "$LATESTXAS $CURRENTXAS" | awk '{print ($1 > $2)}') )) + then + XASTIR=NEEDS-UPDATE + else + XASTIR="is_latest_version" + fi + +echo $XASTIR #----------------------------------------------------# # YAAC