This commit is contained in:
tb14
2022-11-05 17:38:24 -05:00
parent 754691bade
commit c14cda03d6
+12 -7
View File
@@ -1428,26 +1428,31 @@ if [[ ${CHIRP} == ${NEWCHIRP} ]]; then
if [ $PLAT = Linuxmint ]; then if [ $PLAT = Linuxmint ]; then
echo "Installing / Updating CHIRP to version ${NEWCHIRP}" echo "Installing / Updating CHIRP to version ${NEWCHIRP}"
sleep 2 sleep 2
if ! hash flatpak 2>/dev/null; then if ! hash flatpak 2>/dev/null; then
sudo apt-get install -y flatpak || sudo apt-get install -y flatpak ||
{ ERRCODE="Failed to install flatpak."; errors; return; } { ERRCODE="Failed to install flatpak."; errors; return; }
fi fi
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo || sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo ||
{ 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; } { ERRCODE="Failed to install chirp flatpak."; errors; return; }
fi
else else
sudo apt-get install -y snapd || sudo apt-get install -y snapd ||
{ ERRCODE="Failed to install Snap for Chirp installation"; errors; return; } { ERRCODE="Failed to install Snap for Chirp installation"; errors; return; }
sudo snap install chirp-snap --edge || sudo snap install chirp-snap --edge ||
{ ERRCODE="Failed to install Chirp from snap store."; errors; return; } { ERRCODE="Failed to install Chirp from snap store."; errors; return; }
sudo snap connect chirp-snap:raw-usb || sudo snap connect chirp-snap:raw-usb ||
{ ERRCODE="Failed to set USB permissions for Chirp-snap."; errors; return; } { ERRCODE="Failed to set USB permissions for Chirp-snap."; errors; return; }
fi fi
fi fi
} }