From 4b5af7eb7a91d069b6fb00d1de639e650337815f Mon Sep 17 00:00:00 2001 From: tb14 Date: Sat, 5 Nov 2022 17:07:25 -0500 Subject: [PATCH] formatting error --- AmRRON-Setup-Script.sh | 57 +++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/AmRRON-Setup-Script.sh b/AmRRON-Setup-Script.sh index 8eac6c1..ae03e88 100755 --- a/AmRRON-Setup-Script.sh +++ b/AmRRON-Setup-Script.sh @@ -1382,37 +1382,37 @@ else fi } -function old_chirp_install() { -if [[ $NEWCHIRP == "SERVER DOWN" ]]; then - echo "CHIRP server unresponsive or broken link." >> /tmp/failures - 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" +#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 +# 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() { if [[ $NEWCHIRP == "SERVER DOWN" ]]; then @@ -1435,7 +1435,8 @@ if [[ ${CHIRP} == ${NEWCHIRP} ]]; then { ERRCODE="Failed to add flathub remote."; errors; return; } cd $USERDIR && wget -N https://trac.chirp.danplanet.com/chirp_daily/LATEST/chirp-daily-$NEWCHIRP.flatpak || { ERRCODE="Failed to download new version of chirp."; errors; return; } - sudo flatpak install chirp-daily-$NEWCHIRP.flatpak + sudo flatpak install chirp-daily-$NEWCHIRP.flatpak || + { ERRCODE="Failed to install chirp flatpak."; errors; return; } fi }