mirror of
https://gitlab.com/amrron/setup-scripts.git
synced 2026-10-17 01:54:00 -04:00
formatting error
This commit is contained in:
+29
-28
@@ -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
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user