color and cleanup

This commit is contained in:
tb14
2025-06-30 18:56:34 -05:00
parent ffa99eab39
commit 0a5fc34ce3
+13 -17
View File
@@ -168,7 +168,7 @@ echo "${ERRCODE}" >> /tmp/failures
# Determine what is already installed.
function check_installed_programs() {
echo "Please wait while I determine what programs and versions are already present...."
echo -e ${ACTION}"Checking currently installed programs and versions...."${NOCOLOR}
if hash rigctl 2>/dev/null; then
HAMLIB=$(rigctl --version | awk 'FNR ==1 {print $3}')
@@ -420,13 +420,11 @@ fi
function query_updates() {
echo "Checking if curl is installed..."
if ! hash curl 2>/dev/null; then
sudo apt-get install -y curl
fi
echo "Please wait while I determine the most current versions available...."
echo -e ${ACTION}"Gathering updates available..."${NOCOLOR}
NEWHAMLIB=$(curl -s https://sourceforge.net/projects/hamlib/files/latest/download | \
grep -o https://downloads.sourceforge.net/project/hamlib/hamlib/[^/]*/ | \
@@ -442,7 +440,7 @@ if [[ $NEWFLDIGI == "" ]]; then
NEWFLDIGI="SERVER DOWN"
fi
echo "10% Complete"
echo -e ${ACTION} "10% Complete"${NOCOLOR}
#NEWFLMSG=$(curl -s https://www.w1hkj.org/files/flmsg/ | grep -Eo flmsg-'[0-9]{1,4}.[0-9]{1,4}.[0-9]{1,4}'.tar.gz | \
# sort -rn | head -n 1 | awk -F "-" '{print $2}' | awk -F ".tar.gz" '{print $1}')
@@ -455,7 +453,7 @@ if [[ $NEWFLMSG == "" ]]; then
NEWFLMSG="SERVER DOWN"
fi
echo "20% Complete"
echo -e ${ACTION} "20% Complete"${NOCOLOR}
NEWFLAMP=$(curl -s https://www.w1hkj.org/files/flamp/ | grep -Eo flamp-'[0-9]{1,4}.[0-9]{1,4}.[0-9]{1,4}'.tar.gz | \
sort -rn | head -n 1 | awk -F "-" '{print $2}' | awk -F ".tar.gz" '{print $1}')
@@ -463,7 +461,7 @@ if [[ $NEWFLAMP == "" ]]; then
NEWFLAMP="SERVER DOWN"
fi
echo "30% Complete"
echo -e ${ACTION} "30% Complete"${NOCOLOR}
NEWFLRIG=$(curl -s https://www.w1hkj.org/files/flrig/ | grep -Eo flrig-'[0-9]{1,4}.[0-9]{1,4}.[0-9]{1,4}'.tar.gz | \
sort -rn | head -n 1 | awk -F "-" '{print $2}' | awk -F ".tar.gz" '{print $1}')
@@ -477,7 +475,7 @@ if [[ $NEWFLWRAP == "" ]]; then
NEWFLWRAP="SERVER DOWN"
fi
echo "40% Complete"
echo -e ${ACTION} "40% Complete"${NOCOLOR}
NEWARIM=$(curl -s https://www.whitemesa.net/arim/arim.html | grep -m 1 \
"armv7l.tar.gz" | awk -F '-' '{print $2}')
@@ -485,7 +483,7 @@ if [[ $NEWARIM == "" ]]; then
NEWARIM="SERVER DOWN"
fi
echo "50% Complete"
echo -e ${ACTION} "50% Complete"${NOCOLOR}
NEWGARIM=$(curl -s https://www.whitemesa.net/garim/garim.html | grep -m 1 \
"armv7l.tar.gz" | awk -F '-' '{print $2}')
@@ -499,7 +497,7 @@ if [[ $NEWVARIM == "" ]]; then
NEWVARIM="SERVER DOWN"
fi
echo "60% Complete"
echo -e ${ACTION} "60% Complete"${NOCOLOR}
NEWPAT=$(curl -s https://github.com/la5nta/pat/releases | grep -m 1 "amd64.deb"\
| awk -F '_' '{print $2}')
@@ -507,7 +505,7 @@ if [[ $NEWPAT == "" ]]; then
NEWPAT="SERVER DOWN"
fi
echo "70% Complete"
echo -e ${ACTION} "70% Complete"${NOCOLOR}
NEWCHIRP=$(curl -sL https://trac.chirp.danplanet.com/download\?stream\=next | \
grep .tar.gz | awk -F 'chirp-' '{print $2}' | head -c 8)
@@ -515,7 +513,7 @@ if [[ $NEWCHIRP == "" ]]; then
NEWCHIRP="SERVER DOWN"
fi
echo "80% Complete"
echo -e ${ACTION} "80% Complete"${NOCOLOR}
#NEWELECTRUM=$(curl -s https://github.com/spesmilo/electrum/blob/master/RELEASE-\
#NOTES | grep Release | head -n 1 | grep -o '[0-9].[0-9].[0-9]')
@@ -529,7 +527,7 @@ if [[ $NEWVOACAPL == "" ]]; then
NEWVOACAPL="SERVER DOWN"
fi
echo "90% Complete"
echo -e ${ACTION} "90% Complete"${NOCOLOR}
#NEWVC=$(curl -s https://www.veracrypt.fr/en/Downloads.html | sed -n 's/<h3>Latest\ Stable\ Release\ //p' | awk -F '(' '{print $1}' | sed 's/-\ //' | sed 's/\ //' )
#NEWVC=$(curl -s https://www.veracrypt.fr/en/Downloads.html | grep "Linux: Version" | awk -F 'Version' '{print $2}' | awk -F ' ' '{print $1}')
@@ -569,7 +567,7 @@ NEWWSJTX=$(curl -sL https://wsjt.sourceforge.io/wsjtx.html | grep -oP 'WSJT-X [0
NEWJS8CALLVER=$(curl -s https://api.github.com/repos/js8call/js8call/releases/latest | grep '"tag_name"' | sed -E 's/.*"v?([^"]+)".*/\1/')
echo "100% Complete"
echo -e ${READY} "100% Complete"${NOCOLOR}
}
@@ -579,11 +577,9 @@ if [[ $PLAT = "Linuxmint" ]]; then
CHK_DIALOUT=$(id -nG | grep dialout)
if [ -z "$CHK_DIALOUT" ]; then
echo "Adding user to dialout group"
echo -e ${ACTION}"Adding user to dialout group"${NOCOLOR}
sudo usermod -a -G dialout $USER ||
{ ERRCODE="Unable to add user to dialout group. You will need to run sudo usermod -a -G dialout $USER"; errors; return; }
else
echo "User already a member of dialout group."
fi
fi