From 751c62385ac90bdaa4c0d79acfe1e1b86b1c5a50 Mon Sep 17 00:00:00 2001 From: tb14 Date: Sun, 6 Nov 2022 09:50:44 -0600 Subject: [PATCH] working on snap support --- AmRRON-Setup-Script.sh | 60 +++++++++++++--------------- changelogs/CHANGELOG-Setup-Script.md | 1 + 2 files changed, 29 insertions(+), 32 deletions(-) diff --git a/AmRRON-Setup-Script.sh b/AmRRON-Setup-Script.sh index 6f45300..ea52f93 100755 --- a/AmRRON-Setup-Script.sh +++ b/AmRRON-Setup-Script.sh @@ -1446,12 +1446,15 @@ if [[ ${CHIRP} == ${NEWCHIRP} ]]; then sudo apt-get install -y snapd || { ERRCODE="Failed to install Snap for Chirp installation"; errors; return; } - - sudo snap install chirp-snap --edge || + ### Testing to see if this avoids a restart requirement + sudo modprobe squashfs || { ERRCODE="Failed to install Chirp from snap store."; errors; return; } + + sudo snap install chirp-snap --edge || + { echo snap_fail >> /tmp/cleanup; } && { 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; } + { echo snap_fail >> /tmp/cleanup; } && { ERRCODE="Failed to set USB permissions for Chirp-snap."; errors; return; } fi fi @@ -2589,8 +2592,18 @@ function keepassxc_install() { else -sudo apt-get install -y snapd && sudo snap install core && sudo snap install keepassxc || -{ ERRCODE="Failed to install snap / snap core requirements for KeepassXC"; errors; return; } + sudo apt-get install -y snapd || + { ERRCODE="Failed to install snapd."; errors; return; } + +### Testing to see if this avoids a restart requirement + sudo modprobe squashfs || + { ERRCODE="Failed to set modprobe squashfs to avoid restart."; errors; return; } + + sudo snap install core || + { echo snap_fail >> /tmp/cleanup; } && { ERRCODE="Failed to install snap / snap core requirements for KeepassXC"; errors; return; } + + sudo snap install keepassxc || + { echo snap_fail >> /tmp/cleanup; } && { ERRCODE="Failed to install snap / snap core requirements for KeepassXC"; errors; return; } fi } @@ -3282,6 +3295,8 @@ function primer_menu() { echo "This program will assist you in installing or updating radio tools on your \ machine. +It is currently designed and tested for use with Raspberry Pi OS Buster, Bullseye, Bullseye 64bit, Linux Mint 20.3, and Linux Mint 21. + If you previously installed FLDIGI on this machine using a package \ manager, please quit the installer, remove FLDIGI, and restart the program. @@ -3605,6 +3620,7 @@ rc=$? if [[ ! -d $USERDIR ]]; then mkdir -p $USERDIR fi + CONKYSEL=STANDARD easyArray=(HAMLIB FLDIGI FLMSG FLAMP FLRIG FLWRAP ARDOP ARDOPGUI ARIM GARIM VARIM PAT FINDARDOP VOACAP CHIRP WSJTX JS8CALL PULSE UBLOX FORMS MINICOM GTKTERM PUTTY DIREWOLF YAAC PACKET_GUIDE GEDIT VIM FILEZILLA MATCHBOX_KEYBOARD SCREEN SPEEDTEST ELECTRUM CONKY LIBREOFFICE FAIL2BAN KEEPASS ICEWEASEL PTE PFE VERACRYPT BITMESSAGE HARDEN_SSH GTKHASH GPA ICONS) for i in "${easyArray[@]}" @@ -4028,33 +4044,13 @@ cleanupyad ;; -# vc) - -# if [[ ${PLAT} = "Raspbian" ]]; then -# -#TITLE="Veracrypt Raspbian" -#TEXT="Version 1.0f-1 has been downloaded. -# -#You will have to complete installation once this installer exits. -# -#You can do this by navigating to $SECDIR and executing \ -#${VCFILE_name}." -#cleanupyad -# -# else - -#TITLE="Veracrypt Install" -#TEXT="Version $NEWVC has been downloaded and extracted. -# -#You will have to complete installation once this installer exits. -# -#You can do this by navigating to the $SECDIR and executing \ -#veracrypt-$NEWVC-setup-gui-$VCSYS" -# cleanupyad -# -# fi - -# ;; +snap_fail) +TITLE="Requires Reboot" +TEXT="snapd was installed in order to manage the installation of Chirp and keepassxc on this system. \ +Snap requires a reboot before being able to install your programs. Please reboot, run this installer again and \ +and reselect chirp and keepassxc if you would like to install them." + cleanupyad + ;; raspapsetup) diff --git a/changelogs/CHANGELOG-Setup-Script.md b/changelogs/CHANGELOG-Setup-Script.md index 955f3e3..52d5a54 100644 --- a/changelogs/CHANGELOG-Setup-Script.md +++ b/changelogs/CHANGELOG-Setup-Script.md @@ -4,6 +4,7 @@ - Added VARIM to install - Tweaked dialout add function - Switched Chirp and Keepassxc to flatpak install due to snap failures on Mint / snap installation on raspberry pi +- Created "Easy Button" to install everthing to default locations with one click. # Version 0.7.4.2 - Pulling ardopc from gitlab folder due to website release version issues.