From 9299ef3e775f3cd2c2f3555434de483bc296a8b4 Mon Sep 17 00:00:00 2001 From: tb14 Date: Sun, 16 Oct 2022 12:52:51 -0500 Subject: [PATCH] Space cleanup and js8 version checks before install. --- AmRRON-Setup-Script.sh | 112 ++++++++++++++++----------- changelogs/CHANGELOG-Setup-Script.md | 3 +- 2 files changed, 67 insertions(+), 48 deletions(-) diff --git a/AmRRON-Setup-Script.sh b/AmRRON-Setup-Script.sh index e2236f1..d0b4618 100755 --- a/AmRRON-Setup-Script.sh +++ b/AmRRON-Setup-Script.sh @@ -620,6 +620,11 @@ tar -xvzf hamlib-${NEWHAMLIB}.tar.gz && rm hamlib-${NEWHAMLIB}.tar.gz && cd haml sudo ldconfig || { ERRCODE="ldconfig failed"; errors; return; } +#Cleanup space from compiling +if hash rigctld 2>/dev/null; then + sudo rm -r $USERDIR/hamlib-${NEWHAMLIB} +fi + fi @@ -654,6 +659,12 @@ tar.gz && cd fldigi-${NEWFLDIGI} || install || { ERRCODE="Failed to download FLDIGI"; errors; return; } fi + +#Cleanup space from compiling +if hash fldigi 2>/dev/null; then + sudo rm -r $USERDIR/fldigi-${NEWFLDIGI} +fi + fi } @@ -684,6 +695,12 @@ files/flmsg/flmsg-${NEWFLMSG}.tar.gz || install || { ERRCODE="Failed to compile FLMSG"; errors; return; } fi + +#Cleanup space from compiling +if hash flmsg 2>/dev/null; then + sudo rm -r $USERDIR/flmsg-${NEWFLMSG} +fi + fi } @@ -714,6 +731,12 @@ fi install || { ERRCODE="Failed to compile FLAMP"; errors; return; } fi + +#Cleanup space from compiling +if hash flamp 2>/dev/null; then + sudo rm -r $USERDIR/flamp-${NEWFLAMP} +fi + fi } @@ -744,6 +767,12 @@ fi install || { ERRCODE="Failed to compile FLRIG"; errors; return; } fi + +#Cleanup space from compiling +if hash flrig 2>/dev/null; then + sudo rm -r $USERDIR/flrig-${NEWFLRIG} +fi + fi } @@ -774,6 +803,12 @@ fi install || { ERRCODE="Failed to compile FLWRAP"; errors; return; } fi + +#Cleanup space from compiling +if hash flwrap 2>/dev/null; then + sudo rm -r $USERDIR/flwrap-${NEWFLWRAP} +fi + fi } @@ -1114,6 +1149,11 @@ cd arim-${NEWARIM} || ./configure && make && sudo make install || { ERRCODE="Failed to compile ARIM"; errors; return; } + + #Cleanup space from compiling + if hash arim 2>/dev/null; then + sudo rm -r $USERDIR/arim-${NEWARIM} + fi fi } @@ -1143,7 +1183,13 @@ cd garim-${NEWGARIM} || ./configure && make && sudo make install || { ERRCODE="Failed to compile GARIM"; errors; return; } - fi + +#Cleanup space from compiling +if hash garim 2>/dev/null; then + sudo rm -r $USERDIR/garim-${NEWGARIM} +fi + + fi } @@ -1407,54 +1453,20 @@ function amrronforms_install() { } -function js8call_install_old() { -#if [[ ${PLAT} = "Raspbian" ]]; then -# SYS=$"armhf" -# elif [[ $(uname -m) = x86_64 ]]; then -# if [[ $OSCN =~ (tara|tessa|tina|bionic|cosmic|disco) ]]; then -# SYS=$"18.04_amd64" -# elif [[ $OSCN =~ (sara|serena|sonya|sylvia|trusty|xenial) ]]; then -# SYS=$"16.04_amd64" -# fi -# else -# SYS=$"i386" -# fi - -if [[ ${PLAT} = "Raspbian" ]]; then - js8call_link=$(curl -s http://files.js8call.com/latest.html | grep -o "http://files.js8call.com/[0-9].[0-9].[0-9]/js8call_[0-9].[0-9].[0-9]_armhf.deb" | head -n 1) - elif [[ $(uname -m) = x86_64 ]]; then - if [[ $OSCN =~ (tara|tessa|tina|tricia|bionic|cosmic|disco) ]]; then - js8call_link=$(curl -s http://files.js8call.com/latest.html | grep -o "http://files.js8call.com/[0-9].[0-9].[0-9]/js8call_[0-9].[0-9].[0-9]_18.04_amd64.deb" | head -n 1) - elif [[ $OSCN =~ (sara|serena|sonya|sylvia|trusty|xenial) ]]; then - js8call_link=$(curl -s http://files.js8call.com/latest.html | grep -o "http://files.js8call.com/[0-9].[0-9].[0-9]/js8call_[0-9].[0-9].[0-9]_16.04_amd64.deb" | head -n 1) - elif [[ $OSCN =~ (eoan|focal|amber|ulyana) ]]; then - js8call_link=$(curl -s http://files.js8call.com/latest.html | grep -o "http://files.js8call.com/[0-9].[0-9].[0-9]/js8call_[0-9].[0-9].[0-9]_20.04_amd64.deb" | head -n 1) - fi - else - js8call_link=$(curl -s http://files.js8call.com/latest.html | grep -o "http://files.js8call.com/[0-9].[0-9].[0-9]/js8call_[0-9].[0-9].[0-9]_i386.deb" | head -n 1) - fi - - - -sudo apt-get -y install libgfortran5 libqt5multimedia5 libqt5multimedia5-plugins libqt5multimediawidgets5 libqt5serialport5 || - { ERRCODE="Failed to get dependencies for JS8Call"; errors; return; } -#removed libqgsttools-p1 from dependencies - -#wget -P $USERDIR/ -N http://files.js8call.com/${NEWJS8CALLVER}/js8call_${NEWJS8CALLVER}_$SYS.deb || -# { ERRCODE="Failed to download JS8Call"; errors; return; } -wget -P $USERDIR/ -N ${js8call_link} || - { ERRCODE="Failed to download JS8Call"; errors; return; } - -js8call_deb=$(echo ${js8call_link} | awk -F "/" '{print $5}') -sudo dpkg -i $USERDIR/$js8call_deb || - { ERRCODE="Failed to install JS8Call"; errors; return; } - - - -} - function js8call_install() { +if [[ $NEWJS8CALLVER == "SERVER DOWN" ]]; then + echo "JS8Call server unresponsive or broken link." >> /tmp/failures + return +fi + +if [[ ${JS8CALLVER} == ${NEWJS8CALLVER} ]]; then + echo "JS8Call is already at the most current version" + + elif [[ ${JS8CALLVER} == "2.2.1_devel" ]] && [[ ${NEWJS8CALLVER} == "2.2.0" ]]; then + echo "JS8Call is already at the most current version" + + else sudo apt-get install -y build-essential gfortran autoconf automake libtool cmake git asciidoctor libfftw3-dev qtdeclarative5-dev texinfo libqt5multimedia5 libqt5multimedia5-plugins qtmultimedia5-dev libusb-1.0.0-dev libqt5serialport5-dev asciidoc libudev-dev @@ -1474,6 +1486,12 @@ function js8call_install() { { ERRCODE="Failed to build JS8Call."; errors; return; } +#Cleanup space from compiling +if hash js8call 2>/dev/null; then + sudo rm -r $USERDIR/js8call +fi + +fi } function ublox_gps_setup() { diff --git a/changelogs/CHANGELOG-Setup-Script.md b/changelogs/CHANGELOG-Setup-Script.md index 3090226..47c8afa 100644 --- a/changelogs/CHANGELOG-Setup-Script.md +++ b/changelogs/CHANGELOG-Setup-Script.md @@ -10,7 +10,8 @@ - Bitmessage enabled and distro check - Veracrypt version info in selection. - Security tools version checking fixes. - + - More version checking and added space cleanup after compiling Radio tools. + # Version 0.7.0 - Working - Working updates for current release 2022-09-22 Raspios Bullseye 32bit - Changed gfortran3 dep to gfortran5 wsjtx