ardop gui version checking

This commit is contained in:
tb14
2025-06-30 23:04:25 -05:00
parent 3e11238ad8
commit 2d439f22b1
+22 -7
View File
@@ -410,6 +410,16 @@ else
fi
fi
if [ -f $HOME/Radio/ARDOP/gui*.txt ]; then
ARDOPGUIVER=$(ls $HOME/Radio/ARDOP/gui* | awk -F 'ARDOP/gui-' '{print $2}' | awk -F '.txt' '{print $1}' )
else
if [ -f $HOME/Radio/ARDOP/ARDOP_GUI ]; then
ARDOPGUIVER="UNABLE TO DETERMINE"
else
ARDOPGUIVER="NOT INSTALLED"
fi
fi
if [ -f $HOME/Radio/ARDOP/*.txt ]; then
ARDOPCFVER=$(ls $HOME/Radio/ARDOP/v* | awk -F 'ARDOP/v' '{print $2}' | awk -F '.txt' '{print $1}' )
else
@@ -562,7 +572,7 @@ fi
if [[ ${PLAT} = "Raspbian" ]]; then
NEWARDOPGUI=$(curl -s https://www.cantab.net/users/john.wiseman/Downloads/Beta/ | grep 'href="piARDOP_GUI"' | grep -o 20[0-9][0-9]-[0-9][0-9]-[0-9][0-9])
else
NEWARDOPGUI=$(curl -s https://www.cantab.net/users/john.wiseman/Downloads/Beta/ | grep 'href="ARDOP_GUI"' | grep -o 20[0-9][0-9]-[0-9][0-9]-[0-9][0-9])
NEWARDOPGUI=$(curl -s https://www.cantab.net/users/john.wiseman/Downloads/Beta/ | grep "ARDOP_GUI</a>" | grep -oP '\d{4}-\d{2}-\d{2}' | head -1 | xargs -I{} date -d {} +"%d%b%Y")
fi
if [[ $NEWARDOP == "" ]]; then
@@ -1171,6 +1181,11 @@ function ardopcf_install() {
function ardop_gui_install() {
if [[ ${ARDOPGUIVER} == ${NEWARDOPGUI} ]]; then
echo "ARDOPGUI already at current version"
return
fi
ARDOPDIR=$USERDIR/ARDOP
if [[ $(uname -m) =~ (armv7l|aarch64) ]]; then
@@ -1187,7 +1202,8 @@ function ardop_gui_install() {
wiseman/Downloads/Beta/$ARDOPGUI && chmod +x $ARDOPDIR/$ARDOPGUI ||
{ ERRCODE="Failed to download ardop_gui"; errors; return; }
touch $ARDOPDIR/$NEWARDOPGUI.txt ||
{ ERRCODE="Failed to make ARDOP_GUI date marker"; errors; return; }
else
@@ -3992,7 +4008,7 @@ rc=$?
if [[ $rc == 0 ]]; then
sudo apt-get -y update && sudo apt-get -y upgrade
elif [[ $rc == 2 ]]; then
echo "Skipping update check this time"
echo -e ${ACTION}"Skipping system apt update check."${NOCOLOR}
elif [[ $rc == 1 ]]; then
yad --image=$DIR/images/corps-icon.png --center --button="gtk-ok:0" --title "Exit Selected" --text "Exiting installer now" ${r} ${c}
exit 1
@@ -4001,10 +4017,9 @@ rc=$?
# Install git now.
if hash git 2>/dev/null; then
echo "Git is already installed"
else
sudo apt-get -y install git
if ! hash git 2>/dev/null; then
sudo apt-get -y install git > /dev/null
echo -e ${ACTION}Installing git${NOCOLOR}
fi
}