fix xastir update check

pull/267/head
KM4ACK 2021-04-02 18:43:21 -05:00
rodzic 60cb65e871
commit 7bac35726e
1 zmienionych plików z 9 dodań i 4 usunięć

13
update
Wyświetl plik

@ -447,13 +447,18 @@ CHECK() {
#----------------------------------------------------#
# XASTIR
#----------------------------------------------------#
echo "Checking Xastir"
if ! hash xastir 2>/dev/null; then
XASTIR="Not_Installed"
else
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"
if (($(echo "${LATESTXAS} ${CURRENTXAS}" | awk '{print ($1 > $2)}'))); then
XASTIR=NEEDS-UPDATE
else
XASTIR="is_latest_version"
fi
fi
#----------------------------------------------------#