From d5bc5cf67518e37cd2df7940caffa68fd4b25ecf Mon Sep 17 00:00:00 2001 From: Tyler Ward Date: Fri, 6 Aug 2021 23:36:34 -0700 Subject: [PATCH] #64 - update hamlib source to github --- README.md | 2 +- diagnostic | 4 +--- functions/base.function | 8 +++----- update | 4 +--- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 68272c1..a6c3e16 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Software TNC. In this setup, direwolf is used for 2M packet connection with Pat AX25 tools for Direwolf & Pat. Recommended if installing Pat. #### HAMLIB: -Rig contol software. https://sourceforge.net/projects/hamlib/ +Rig contol software. https://github.com/Hamlib/Hamlib #### PULSE: Pulse audio. Provides a way to configure virtual sound cards. REQUIRED for AMRRON ops. diff --git a/diagnostic b/diagnostic index 3e9a163..de623dc 100644 --- a/diagnostic +++ b/diagnostic @@ -75,9 +75,7 @@ CHECK() { else echo "Checking Rig Control" RIG=$(rigctl --version | grep Hamlib | sed s/"rigctl(d),\ Hamlib\ "//) - NEWRIG=$(curl -s https://sourceforge.net/projects/hamlib/files/latest/download | - grep -o https://downloads.sourceforge.net/project/hamlib/hamlib/[0-9].[0-9] | - head -n 1 | awk -F "/" '{print $7}') + NEWRIG=$(curl -s https://api.github.com/repos/Hamlib/Hamlib/releases/latest| jq -r '.tag_name') if (($(echo "${NEWRIG} ${RIG}" | awk '{print ($1 > $2)}'))); then RIG=NEEDS-UPDATE diff --git a/functions/base.function b/functions/base.function index 6d38550..7304ae3 100644 --- a/functions/base.function +++ b/functions/base.function @@ -113,10 +113,8 @@ EOF ################################ HAMLIB() { cd ${DIR} || return - NEWRIG=$(curl -s https://sourceforge.net/projects/hamlib/files/latest/download | - grep -o https://downloads.sourceforge.net/project/hamlib/hamlib/[0-9].[0-9] | - head -n 1 | awk -F "/" '{print $7}') - HAMLIBLINK=https://sourceforge.net/projects/hamlib/files/hamlib/${NEWRIG}/hamlib-${NEWRIG}.tar.gz + NEWRIG=$(curl -s https://api.github.com/repos/Hamlib/Hamlib/releases/latest| jq -r '.tag_name') + HAMLIBLINK=https://github.com/Hamlib/Hamlib/releases/download/${NEWRIG/hamlib-${NEWRIG}.tar.gz cd ${HOME}/Downloads || return echo "###################################" echo "# Installing Hamlib " @@ -192,4 +190,4 @@ Categories=Utility EOF sudo mv gpsupdate.desktop /usr/share/applications/ -} \ No newline at end of file +} diff --git a/update b/update index c233a7f..422a0fe 100755 --- a/update +++ b/update @@ -225,9 +225,7 @@ CHECK() { else echo "Checking Rig Control" RIG=$(rigctl --version | grep Hamlib | sed s/"rigctl(d),\ Hamlib\ "//) - NEWRIG=$(curl -s https://sourceforge.net/projects/hamlib/files/latest/download | - grep -o https://downloads.sourceforge.net/project/hamlib/hamlib/[0-9].[0-9] | - head -n 1 | awk -F "/" '{print $7}') + NEWRIG=$(curl -s https://api.github.com/repos/Hamlib/Hamlib/releases/latest| jq -r '.tag_name') if (($(echo "${NEWRIG} ${RIG}" | awk '{print ($1 > $2)}'))); then RIG=NEEDS-UPDATE