From 1b88e90405326d27818fa5c024ced01c7b9b735b Mon Sep 17 00:00:00 2001 From: KM4ACK Date: Sun, 26 Dec 2021 14:04:51 -0600 Subject: [PATCH] add version check --- patmenu | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/patmenu b/patmenu index 5edf943..9697cb0 100755 --- a/patmenu +++ b/patmenu @@ -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\rPlease update Pat Winlink" \ +--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 \