formatting error

This commit is contained in:
tb14
2022-11-05 17:07:25 -05:00
parent a6fed4e662
commit 4b5af7eb7a
+29 -28
View File
@@ -1382,37 +1382,37 @@ else
fi fi
} }
function old_chirp_install() { #function old_chirp_install() {
if [[ $NEWCHIRP == "SERVER DOWN" ]]; then #if [[ $NEWCHIRP == "SERVER DOWN" ]]; then
echo "CHIRP server unresponsive or broken link." >> /tmp/failures # echo "CHIRP server unresponsive or broken link." >> /tmp/failures
return # return
fi #fi
if [[ ${CHIRP} == ${NEWCHIRP} ]]; then #if [[ ${CHIRP} == ${NEWCHIRP} ]]; then
echo "Chirp is already at the most current version" # echo "Chirp is already at the most current version"
else # else
echo "Installing / Updating CHIRP to version ${NEWCHIRP}" # echo "Installing / Updating CHIRP to version ${NEWCHIRP}"
sleep 2 # sleep 2
if [[ ${CHIRP} == "NOT INSTALLED" ]]; then # 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
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() { function chirp_install() {
if [[ $NEWCHIRP == "SERVER DOWN" ]]; then if [[ $NEWCHIRP == "SERVER DOWN" ]]; then
@@ -1435,7 +1435,8 @@ if [[ ${CHIRP} == ${NEWCHIRP} ]]; then
{ ERRCODE="Failed to add flathub remote."; errors; return; } { ERRCODE="Failed to add flathub remote."; errors; return; }
cd $USERDIR && wget -N https://trac.chirp.danplanet.com/chirp_daily/LATEST/chirp-daily-$NEWCHIRP.flatpak || 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; } { 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 fi
} }