From b1ce4793c3b2682bcaf6f33eb384b1ce56107b16 Mon Sep 17 00:00:00 2001 From: KM4ACK Date: Thu, 18 Nov 2021 08:37:22 -0600 Subject: [PATCH] add pat version check --- functions/additional.function | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/functions/additional.function b/functions/additional.function index d277c84..16da0c0 100644 --- a/functions/additional.function +++ b/functions/additional.function @@ -81,7 +81,33 @@ PAT-MENU() { rm -rf "${HOME}/patmenu2" fi cd ${HOME} - git clone https://github.com/km4ack/patmenu2.git ${HOME}/patmenu2 && bash ${HOME}/patmenu2/setup + git clone https://github.com/km4ack/patmenu2.git ${HOME}/patmenu2 + ##################################### + # Pat 12 Temp Workaround + ##################################### + #This will move the user to the "version12" branch of the Pat Menu code + #until this can be implemented into the main branch of code. This will + #allow Pat Menu to support both the new version of Pat as well as older + #versions. This section of code needs to be removed once the "version12" + #branch is merged with the master branch + + PAT_VERSION=$(pat version | awk '{print $2}' | sed 's/v0.//;s/.0//') + + if [ "$PAT_VERSION" -le 11 ]; then + echo "pat version 11 detected" + else + echo "pat version 12 or greater detected" + echo "moving pat menu to the version12 branch" + cd $HOME/patmenu2 + git pull + git checkout version12 + fi + + ##################################### + # END Pat 12 Temp Workaround + ##################################### + + bash ${HOME}/patmenu2/setup sed -i "s/N0CALL/${CALL}/" ${HOME}/patmenu2/config sed -i 's/1,0/3,0/g' ${HOME}/patmenu2/config #restore config files