Skip to content

Commit

Permalink
update xastir version check
Browse files Browse the repository at this point in the history
  • Loading branch information
km4ack committed Jan 29, 2021
1 parent ce5530b commit d50129f
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions update
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d50129f

Please sign in to comment.