working on commstat Mint 22 automation.

This commit is contained in:
tb14
2025-01-14 10:12:21 -06:00
parent 37c9a48c50
commit 8e00058fd4
+34 -136
View File
@@ -1414,14 +1414,12 @@ cd garim-${NEWGARIM} ||
./configure && make && sudo make install ||
{ ERRCODE="Failed to compile GARIM"; errors; return; }
#Cleanup space from compiling
#if hash garim 2>/dev/null; then
# sudo rm -r $USERDIR/garim-${NEWGARIM}
#fi
fi
}
function varim_install() {
if [[ $NEWVARIM == "SERVER DOWN" ]]; then
echo "VARIM server unresponsive or broken link." >> /tmp/failures
@@ -1448,14 +1446,11 @@ cd varim-${NEWVARIM} ||
./configure && make && sudo make install ||
{ ERRCODE="Failed to compile VARIM"; errors; return; }
#Cleanup space from compiling
#if hash garim 2>/dev/null; then
# sudo rm -r $USERDIR/garim-${NEWGARIM}
#fi
fi
}
function pat_install() {
if [[ $NEWPAT == "SERVER DOWN" ]]; then
echo "PAT server unresponsive or broken link." >> /tmp/failures
@@ -1573,6 +1568,9 @@ else
fi
}
function voacap_install() {
if [[ $NEWVOACAPL == "SERVER DOWN" ]]; then
@@ -1623,44 +1621,9 @@ fi
cp $USERDIR/pythonprop-0.30.1/data/voacapgui.desktop ~/Desktop/ ||
{ ERRCODE="Failed to copy VOACAPL pythonprop GUI desktop shortcut"; errors; return; }
#else
# { echo voacap_os >> /tmp/cleanup; } && { ERRCODE="VOACAP GUI is not supported on your OS."; errors; return; }
#fi
}
#function old_chirp_install() {
#if [[ $NEWCHIRP == "SERVER DOWN" ]]; then
# echo "CHIRP server unresponsive or broken link." >> /tmp/failures
# return
#fi
#if [[ ${CHIRP} == ${NEWCHIRP} ]]; then
# echo "Chirp is already at the most current version"
# else
# echo "Installing / Updating CHIRP to version ${NEWCHIRP}"
# sleep 2
# if [[ ${CHIRP} == "NOT INSTALLED" ]]; then
#
# if [[ ${PLAT} = "Linuxmint" ]]; then
# if [[ -f /etc/apt/preferences.d/nosnap.pref ]]; then
# sudo mv /etc/apt/preferences.d/nosnap.pref /etc/apt/preferences.d/nosnap.pref.bak ||
# { ERRCODE="Failed to remove Linuxmint block from using snaps. Remove /etc/apt/preferences.d/nosnap.pref to enable snaps."; errors; return; }
# fi
# fi
# sudo apt-get install -y snapd ||
# { ERRCODE="Failed to install Snap for Chirp installation"; errors; return; }
#
# sudo snap install chirp-snap --edge ||
# { ERRCODE="Failed to install Chirp from snap store."; errors; return; }
# sudo snap connect chirp-snap:raw-usb ||
# { ERRCODE="Failed to set USB permissions for Chirp-snap."; errors; return; }
# fi
#}
function chirp_install_old2() {
@@ -1754,11 +1717,8 @@ if [[ ${WSJTXVER} == ${NEWWSJTX} ]]; then
#install from source
sudo apt install -y qtmultimedia5-dev libqt5serialport5-dev qttools5-dev qttools5-dev-tools libqt5multimedia5-plugins libboost-all-dev libfftw3-dev libreadline-dev libusb-1.0-0-dev libudev-dev portaudio19-dev cmake libgfortran5
# cd $USERDIR && curl -sL https://sourceforge.net/projects/wsjt/files/wsjtx-${NEWWSJTX}/wsjtx-${NEWWSJTXr}.tgz/download
#WSJTXPKG=$(curl -sL https://sourceforge.net/projects/wsjt/files/wsjtx-${NEWWSJTX} | grep .tgz | sed 's/.*="//;s/">.*$//' | head -1)
#WSJTXDIR=$(echo $WSJTXPKG | sed 's/.tgz//')
WSJTXPKG=wsjtx-${NEWWSJTX}.tgz
WSJTXBASEDIRVER=$(echo ${NEWWSJTX} | awk -F "-" '{print $1}')
WSJTXDIR=wsjtx-${WSJTXBASEDIRVER}
@@ -1785,62 +1745,11 @@ echo $WSJTXDIR
{ ERRCODE="Failed to build WSJTX."; errors; return; }
#Cleanup space from compiling
#if hash wsjtx 2>/dev/null; then
# sudo rm -r $USERDIR/$WSJTXDIR
#fi
fi
}
#function amrronforms_install() {
# FORMSDIR=$HOME/.nbems/CUSTOM
# if [ ! -d $HOME/.nbems/CUSTOM ]; then
# mkdir -p $HOME/.nbems/CUSTOM/ ||
# { ERRCODE="Failed to create directory at $HOME/.nbems/CUSTOM/"; errors; return; }
# fi
#
# if ls $FORMSDIR/*REPV3.html 1>/dev/null 2>&1; then
# echo "V3 of Forms are already installed"
# else
# cd $FORMSDIR && wget -N https://amrron.com/wp-content/uploads/2014/\
#11/AmRRON-Custom-Forms-V3.zip ||
# { ERRCODE="Failed to download AmRRON Custom Forms V3"; errors; return; }
# fi
#
# if [[ -f $FORMSDIR/AMRRON_BLANKV3.html ]]; then
# echo "AmRRON Blank V3 is already installed."
# else
# cd $FORMSDIR && wget -N https://amrron.com/wp-content/uploads/\
#2013/11/AMRRON_BLANKV3.zip ||
# { ERRCODE="Failed to download AmRRON Blank V3"; errors; return; }
# fi
#
# if [[ -f $FORMSDIR/AmRRON_StatRepv2.html ]]; then
# echo "AmRRON STATREP V2 is already installed"
# else
# cd $FORMSDIR && wget -N https://amrron.com/wp-content/uploads/\
#2018/03/AmRRON_StatRepv2.zip ||
# { ERRCODE="Failed to download AmRRON StatRep V2"; errors; return; }
# fi
#
# if [[ -f $FORMSDIR/amrron_statrep_V4.0.html ]]; then
# echo "AmRRON STATREP V4 is already installed"
# else
# cd $FORMSDIR && wget -N https://amrron.com/wp-content/uploads/2023/02/amrron_statrep_V4.0.html.zip ||
# { ERRCODE="Failed to download AmRRON StatRep V4"; errors; return; }
# fi
#
# if ls $FORMSDIR/*zip 1>/dev/null 2>&1; then
# echo "Extracting forms..."
# unzip -o $FORMSDIR/'*'.zip && rm $FORMSDIR/*.zip ||
# { ERRCODE="Failed to move forms to $HOME/.nbems/CUSTOM/"; errors; return; }
# else
# echo "All custom forms are already installed."
# fi
# }
function amrronforms_install() {
FORMSDIR=$HOME/.nbems/CUSTOM
if [ ! -d $HOME/.nbems/CUSTOM ]; then
@@ -1878,48 +1787,22 @@ else
fi
}
if [[ $OSCN = wilma ]]; then
#function js8call_install() {
#
#if [[ $NEWJS8CALLVER == "SERVER DOWN" ]]; then
# echo "JS8Call server unresponsive or broken link." >> /tmp/failures
# return
#fi
cd ~/Radio/commstatone && python3 -m venv venv ||
{ ERRCODE="Failed to create python virtual environment"; errors; return; }
#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
source venv/bin/activate ||
{ ERRCODE="Failed to activate python virtual environment"; errors; return; }
# 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
pip3 install pyqt5 ||
{ ERRCODE="Failed to download pyqt5 dependency"; errors; return; }
# JS8PKG=$(curl -s http://files.js8call.com/latest.html | grep .tgz | sed 's/.*js8call-/js8call-/;s/<.*$//')
# JS8VERSION=$(echo $JS8PKG | sed 's/js8call-//;s/.tgz.*$//')
pip3 install pyqtwebengine ||
{ ERRCODE="Failed to download pyqtwebengine dependency"; errors; return; }
fi
# wget -P $USERDIR/ -N http://files.js8call.com/$JS8VERSION/$JS8PKG ||
# { ERRCODE="Failed to download JS8Call"; errors; return; }
# cd $USERDIR && tar -xvf $USERDIR/$JS8PKG && rm $USERDIR/$JS8PKG ||
# { ERRCODE="Unable to extract JS8call Source Code"; errors; return; }
# cd $USERDIR/js8call
# cmake . && cmake --build . -- -j4 && sudo make 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 js8call_install() {
@@ -2439,6 +2322,20 @@ fi
if [[ -f $USERDIR/commstatone/commstat.py ]]; then
if [[ OSCN = wilma ]]; then
echo "[Desktop Entry]
Name=CommstatOne
GenericName=CommstatOne
Comment=Commstat JS8 SA Tool
Path=$USERDIR/commstatone/
Exec=$USERDIR/commstatone/venv/bin/python3 commstat.py
Icon=$USERDIR/icons/commstat.jpg
Terminal=false
Type=Application
Categories=Radio;" > $HOME/Desktop/commstat.desktop ||
{ ERRCODE="Failed to create desktop icon for CommstatOne"; errors; }
else
echo "[Desktop Entry]
Name=CommstatOne
GenericName=CommstatOne
@@ -2450,6 +2347,7 @@ Terminal=false
Type=Application
Categories=Radio;" > $HOME/Desktop/commstat.desktop ||
{ ERRCODE="Failed to create desktop icon for CommstatOne"; errors; }
fi
if [[ ! -f $USERDIR/icons/commstat.jpg ]]; then
mkdir -p $USERDIR/icons && wget --no-check-certificate -O $USERDIR/icons/commstat.jpg -N https://amrron.com/wp-content/uploads/2023/02/JS8Call_Commstat_Data.jpg ||