diff --git a/AmRRON-Vara-setup.sh b/AmRRON-Vara-setup.sh index 911d3b0..d58e1fc 100755 --- a/AmRRON-Vara-setup.sh +++ b/AmRRON-Vara-setup.sh @@ -20,6 +20,10 @@ echo "╠═╣║║║╠╦╝╠╦╝║ ║║║║ ║ ║ ║╠╦ echo "╩ ╩╩ ╩╩╚═╩╚═╚═╝╝╚╝ ╚═╝╚═╝╩╚═╩ ╚═╝"; echo "###########################################" echo "###########################################" + +if $(sudo -n true); then + return; +else echo "You will be prompted for your sudo password" echo "below in order to install vara dependencies." echo "###########################################" @@ -28,7 +32,7 @@ sudo -v # Keep-alive: update existing `sudo` time stamp until script has finished while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & - +fi #### Program setup functions # Find out if we have yad and install if not @@ -164,9 +168,9 @@ if [[ -f /tmp/varafailures ]]; then mv /tmp/varafailures /tmp/varafailures.bak fi -function confirm_mint21() { +function confirm_os() { -if [[ $OSCN =~ una|vanessa ]]; then +if [[ $OSCN =~ buster|bullseye|una|vanessa ]]; then echo "Continuing with install" else yad --image=$DIR/images/corps-icon.png --center \ @@ -200,10 +204,9 @@ echo "VARA HF URL: ${VARAHFLINK}" function primer_menu() { -echo "This program is designed to assist you with installing VARA HF, VARA FM, \ -and Winlink RMS Express on your linux machine. The current version has \ -only been tested on Mint 21. I will continue to expand support for Mint 20 and Rasberry Pi OS \ -in the future. +echo "This program is designed to assist you with installing VARA HF and VARA FM, \ +on your linux machine. The current version has only been tested on Mint 21. I will \ +continue to expand support for Mint 20 and Rasberry Pi OS in the future. Super User (sudo) priveledges are required to perform the apt-get \ commands. @@ -217,8 +220,7 @@ line of this script to alsa if you desire to use alsa instead. This will: \ check and add user to the dialout, audio, and tty usergroups; \ -Install wine and winetricks; download and install VARA HF and FM; \ -download and install Winlink Express." | yad \ +Install wine and winetricks; download and install VARA HF and FM" | yad \ --image=$DIR/images/corps-icon.png \ --text-info \ --wrap \ @@ -301,10 +303,26 @@ winecfg } -function installvara() { +function installvara_mint() { #download/install VARA HF/FM + +if [[ $OSCN = una ]]; then +sudo apt install -y curl libcurl4-openssl-dev libssl-dev || +{ ERRCODE="Failed to install dependencies for pulling vara installation files"; errors; return; } +cd $HOME/Downloads && wget -N https://megatools.megous.com/builds/megatools-1.10.3.tar.gz || +{ ERRCODE="Failed to download megatools source code."; errors; return; } +tar -xzvf megatools-1.10.3.tar.gz && cd megatools-1.10.3/ || +{ ERRCODE="Failed to extract megatools source code."; errors; return; } +./configure && make && sudo make install || +{ ERRCODE="Failed to build megatools source code."; errors; return; } + +elif [[ $OSCN = vanessa ]]; then + sudo apt install -y megatools curl p7zip-full || { ERRCODE="Failed to install dependencies for pulling vara installation files"; errors; return; } + +fi + cd $HOME/Downloads megadl ${VARAHFLINK} || { ERRCODE="Failed to download VARA HF"; errors; return; } @@ -355,6 +373,7 @@ unzip Winlink_Express_install*.zip && rm Winlink_Express_install*.zip || } + function failure_handling() { FAIL=$(cat /tmp/varafailures) || echo "No failures recorded" @@ -427,13 +446,13 @@ exit 1 set_screen_size -confirm_mint21 +confirm_os primer_menu if [[ $PLAT = Linuxmint ]]; then usergroups install_wine -installvara -installrmsexpress +installvara_mint +#installrmsexpress else pi_install fi diff --git a/changelogs/CHANGELOG-Vara-setup.md b/changelogs/CHANGELOG-Vara-setup.md index 401d252..73ed2eb 100644 --- a/changelogs/CHANGELOG-Vara-setup.md +++ b/changelogs/CHANGELOG-Vara-setup.md @@ -1,5 +1,6 @@ # Version 0.2 - testing sudo keepalive and Mint 20.3 support +- basic shell for pi setup # Version 0.1 - initial testing for Vara install on Mint 21. \ No newline at end of file