mirror of
https://gitlab.com/amrron/setup-scripts.git
synced 2026-10-17 01:54:00 -04:00
changed to flatpak for chirp and keepassxc
This commit is contained in:
+43
-27
@@ -1382,7 +1382,7 @@ else
|
||||
fi
|
||||
}
|
||||
|
||||
function chirp_install() {
|
||||
function old_chirp_install() {
|
||||
if [[ $NEWCHIRP == "SERVER DOWN" ]]; then
|
||||
echo "CHIRP server unresponsive or broken link." >> /tmp/failures
|
||||
return
|
||||
@@ -1396,7 +1396,7 @@ if [[ ${CHIRP} == ${NEWCHIRP} ]]; then
|
||||
echo "Installing / Updating CHIRP to version ${NEWCHIRP}"
|
||||
sleep 2
|
||||
if [[ ${CHIRP} == "NOT INSTALLED" ]]; then
|
||||
#sudo apt-get install -y python-gtk2 python-serial python-libxml2 python-future ||
|
||||
|
||||
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 ||
|
||||
@@ -1405,7 +1405,6 @@ if [[ ${CHIRP} == ${NEWCHIRP} ]]; then
|
||||
fi
|
||||
sudo apt-get install -y snapd ||
|
||||
{ ERRCODE="Failed to install Snap for Chirp installation"; errors; return; }
|
||||
# { ERRCODE="Failed to get dependencies for CHIRP"; errors; return; }
|
||||
|
||||
sudo snap install chirp-snap --edge ||
|
||||
{ ERRCODE="Failed to install Chirp from snap store."; errors; return; }
|
||||
@@ -1413,31 +1412,31 @@ if [[ ${CHIRP} == ${NEWCHIRP} ]]; then
|
||||
{ ERRCODE="Failed to set USB permissions for Chirp-snap."; errors; return; }
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
function 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"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# cd $USERDIR && wget -N https://trac.chirp.danplanet.com/\
|
||||
#chirp_daily/LATEST/chirp-daily-${NEWCHIRP}.tar.gz ||
|
||||
# { ERRCODE="Failed to download CHIRP"; errors; return; }
|
||||
# tar xzvf chirp-daily-${NEWCHIRP}.tar.gz && rm chirp-daily-\
|
||||
#${NEWCHIRP}.tar.gz ||
|
||||
# { ERRCODE="Failed to extract CHIRP"; errors; return; }
|
||||
|
||||
# cd $USERDIR/chirp-daily-${NEWCHIRP} ||
|
||||
# { ERRCODE="Failed to enter CHIRP directory"; errors; return; }
|
||||
|
||||
# sudo python setup.py install ||
|
||||
# { ERRCODE="Failed to install CHIRP"; errors; return; }
|
||||
fi
|
||||
|
||||
# sudo usermod -aG dialout $USER ||
|
||||
# { ERRCODE="Failed to add $USER to dialout group"; errors; return; }
|
||||
|
||||
|
||||
|
||||
|
||||
else
|
||||
echo "Installing / Updating CHIRP to version ${NEWCHIRP}"
|
||||
sleep 2
|
||||
if ! hash flatpak 2>/dev/null; then
|
||||
sudo apt-get install flatpak ||
|
||||
{ ERRCODE="Failed to install flatpak."; errors; return; }
|
||||
fi
|
||||
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo ||
|
||||
{ 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
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
@@ -2537,7 +2536,7 @@ function fail2ban_install() {
|
||||
sudo apt-get -y install fail2ban
|
||||
}
|
||||
|
||||
function keepassxc_install() {
|
||||
function old_keepassxc_install() {
|
||||
|
||||
if hash snap 2>/dev/null; then
|
||||
sudo snap install core && sudo snap install keepassxc ||
|
||||
@@ -2556,8 +2555,25 @@ sudo apt-get install -y snapd && sudo snap install core && sudo snap install kee
|
||||
|
||||
fi
|
||||
#fi
|
||||
#flatpak install flathub org.keepassxc.KeePassXC
|
||||
}
|
||||
|
||||
function keepassxc_install() {
|
||||
|
||||
if ! hash flatpak 2>/dev/null; then
|
||||
sudo apt-get install flatpak ||
|
||||
{ ERRCODE="Failed to install flatpak."; errors; return; }
|
||||
fi
|
||||
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo ||
|
||||
{ ERRCODE="Failed to add flathub remote."; errors; return; }
|
||||
|
||||
sudo flatpak install flathub org.keepassxc.KeePassXC ||
|
||||
{ ERRCODE="Failed to install keepassxc flatpak."; errors; return; }
|
||||
|
||||
#flatpak install flathub org.keepassxc.KeePassXC
|
||||
|
||||
|
||||
}
|
||||
|
||||
function iceweasel_install() {
|
||||
sudo apt-get install -y iceweasel
|
||||
|
||||
Reference in New Issue
Block a user