Skip to content

Commit d50129f

Browse files
committed
update xastir version check
1 parent ce5530b commit d50129f

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

update

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -458,12 +458,17 @@ fi
458458
#----------------------------------------------------#
459459
# XASTIR
460460
#----------------------------------------------------#
461-
XA="/usr/bin/xastir"
462-
if [ ! -f "$XA" ]; then
463-
XASTIR="Not Installed"
464-
else
465-
XASTIR="Installed"
466-
fi
461+
LATESTXAS=$(curl -s https://github.com/Xastir/Xastir | grep Release- | head -1 | sed 's/.*Release-//;s/">//')
462+
CURRENTXAS=$(xastir -V | sed 's/Xastir V//;s/(.*//;/^\s*$/d')
463+
464+
if (( $(echo "$LATESTXAS $CURRENTXAS" | awk '{print ($1 > $2)}') ))
465+
then
466+
XASTIR=NEEDS-UPDATE
467+
else
468+
XASTIR="is_latest_version"
469+
fi
470+
471+
echo $XASTIR
467472

468473
#----------------------------------------------------#
469474
# YAAC

0 commit comments

Comments
 (0)