1
0
mirror of https://github.com/km4ack/patmenu2.git synced 2025-05-17 07:10:17 -07:00

add version check

This commit is contained in:
KM4ACK 2021-12-26 14:04:51 -06:00
parent 4735e29a26
commit 1b88e90405

13
patmenu
View File

@ -12,6 +12,19 @@ VERSION=$(cat $MYPATH/changelog | grep release | head -1 | sed 's/release=//')
source $MYPATH/config
#verify pat is at least v0.12.0
PAT_VER=`pat version | awk '{print $2}' | awk -F "." '{print $2}'`
if [ $PAT_VER -lt 13 ]; then
#give user notice
yad --form --width=420 --text-align=center --center --title="Pat out of Date" --text-align=center \
--image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \
--text="Pat Menu only supports Pat Winlink\rversion 0.12.0 or later\r<b>Please update Pat Winlink</b>" \
--button=gtk-ok
exit
fi
#verify call is set
if [ "$MYCALLSIGN" = "N0CALL" ]; then
yad --title="N0CALL" --width=400 --height=100 \
--image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \