mirror of
https://gitlab.com/amrron/setup-scripts.git
synced 2026-10-17 01:54:00 -04:00
megatools fix for 20.3
This commit is contained in:
+32
-13
@@ -20,6 +20,10 @@ echo "╠═╣║║║╠╦╝╠╦╝║ ║║║║ ║ ║ ║╠╦
|
|||||||
echo "╩ ╩╩ ╩╩╚═╩╚═╚═╝╝╚╝ ╚═╝╚═╝╩╚═╩ ╚═╝";
|
echo "╩ ╩╩ ╩╩╚═╩╚═╚═╝╝╚╝ ╚═╝╚═╝╩╚═╩ ╚═╝";
|
||||||
echo "###########################################"
|
echo "###########################################"
|
||||||
echo "###########################################"
|
echo "###########################################"
|
||||||
|
|
||||||
|
if $(sudo -n true); then
|
||||||
|
return;
|
||||||
|
else
|
||||||
echo "You will be prompted for your sudo password"
|
echo "You will be prompted for your sudo password"
|
||||||
echo "below in order to install vara dependencies."
|
echo "below in order to install vara dependencies."
|
||||||
echo "###########################################"
|
echo "###########################################"
|
||||||
@@ -28,7 +32,7 @@ sudo -v
|
|||||||
|
|
||||||
# Keep-alive: update existing `sudo` time stamp until script has finished
|
# 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 &
|
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
|
||||||
|
fi
|
||||||
|
|
||||||
#### Program setup functions
|
#### Program setup functions
|
||||||
# Find out if we have yad and install if not
|
# 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
|
mv /tmp/varafailures /tmp/varafailures.bak
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function confirm_mint21() {
|
function confirm_os() {
|
||||||
|
|
||||||
if [[ $OSCN =~ una|vanessa ]]; then
|
if [[ $OSCN =~ buster|bullseye|una|vanessa ]]; then
|
||||||
echo "Continuing with install"
|
echo "Continuing with install"
|
||||||
else
|
else
|
||||||
yad --image=$DIR/images/corps-icon.png --center \
|
yad --image=$DIR/images/corps-icon.png --center \
|
||||||
@@ -200,10 +204,9 @@ echo "VARA HF URL: ${VARAHFLINK}"
|
|||||||
|
|
||||||
function primer_menu() {
|
function primer_menu() {
|
||||||
|
|
||||||
echo "This program is designed to assist you with installing VARA HF, VARA FM, \
|
echo "This program is designed to assist you with installing VARA HF and VARA FM, \
|
||||||
and Winlink RMS Express on your linux machine. The current version has \
|
on your linux machine. The current version has only been tested on Mint 21. I will \
|
||||||
only been tested on Mint 21. I will continue to expand support for Mint 20 and Rasberry Pi OS \
|
continue to expand support for Mint 20 and Rasberry Pi OS in the future.
|
||||||
in the future.
|
|
||||||
|
|
||||||
Super User (sudo) priveledges are required to perform the apt-get \
|
Super User (sudo) priveledges are required to perform the apt-get \
|
||||||
commands.
|
commands.
|
||||||
@@ -217,8 +220,7 @@ line of this script to alsa if you desire to use alsa instead.
|
|||||||
|
|
||||||
This will: \
|
This will: \
|
||||||
check and add user to the dialout, audio, and tty usergroups; \
|
check and add user to the dialout, audio, and tty usergroups; \
|
||||||
Install wine and winetricks; download and install VARA HF and FM; \
|
Install wine and winetricks; download and install VARA HF and FM" | yad \
|
||||||
download and install Winlink Express." | yad \
|
|
||||||
--image=$DIR/images/corps-icon.png \
|
--image=$DIR/images/corps-icon.png \
|
||||||
--text-info \
|
--text-info \
|
||||||
--wrap \
|
--wrap \
|
||||||
@@ -301,10 +303,26 @@ winecfg
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function installvara() {
|
function installvara_mint() {
|
||||||
#download/install VARA HF/FM
|
#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 ||
|
sudo apt install -y megatools curl p7zip-full ||
|
||||||
{ ERRCODE="Failed to install dependencies for pulling vara installation files"; errors; return; }
|
{ ERRCODE="Failed to install dependencies for pulling vara installation files"; errors; return; }
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
cd $HOME/Downloads
|
cd $HOME/Downloads
|
||||||
megadl ${VARAHFLINK} ||
|
megadl ${VARAHFLINK} ||
|
||||||
{ ERRCODE="Failed to download VARA HF"; errors; return; }
|
{ 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() {
|
function failure_handling() {
|
||||||
|
|
||||||
FAIL=$(cat /tmp/varafailures) || echo "No failures recorded"
|
FAIL=$(cat /tmp/varafailures) || echo "No failures recorded"
|
||||||
@@ -427,13 +446,13 @@ exit 1
|
|||||||
|
|
||||||
|
|
||||||
set_screen_size
|
set_screen_size
|
||||||
confirm_mint21
|
confirm_os
|
||||||
primer_menu
|
primer_menu
|
||||||
if [[ $PLAT = Linuxmint ]]; then
|
if [[ $PLAT = Linuxmint ]]; then
|
||||||
usergroups
|
usergroups
|
||||||
install_wine
|
install_wine
|
||||||
installvara
|
installvara_mint
|
||||||
installrmsexpress
|
#installrmsexpress
|
||||||
else
|
else
|
||||||
pi_install
|
pi_install
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# Version 0.2
|
# Version 0.2
|
||||||
- testing sudo keepalive and Mint 20.3 support
|
- testing sudo keepalive and Mint 20.3 support
|
||||||
|
- basic shell for pi setup
|
||||||
|
|
||||||
# Version 0.1
|
# Version 0.1
|
||||||
- initial testing for Vara install on Mint 21.
|
- initial testing for Vara install on Mint 21.
|
||||||
Reference in New Issue
Block a user