add pat version check

bullseye
KM4ACK 2021-11-18 08:37:22 -06:00
rodzic d6c64c6184
commit b1ce4793c3
1 zmienionych plików z 27 dodań i 1 usunięć

Wyświetl plik

@ -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