fixed missing fi

This commit is contained in:
tb14
2022-10-15 17:21:48 -05:00
parent f31c1984d5
commit 83f5e59579
+4 -35
View File
@@ -2401,54 +2401,23 @@ sudo apt-get -y install fail2ban
}
function keepassxc_install() {
#if [[ ${PLAT} = "Raspbian" ]]; then
#if hash keepassxc 2>/dev/null; then
# cd $SECDIR/keepassxc/ && git checkout master && git pull ||
# { ERRCODE="Failed to update KeepassXC"; errors; return; }
# else
#
# sudo apt-get install -y make cmake qtbase5-dev libyubikey-dev \
# libykpers-1-dev libargon2-0-dev libgcrypt20 zlib1g libmicrohttpd-dev \
# libxi-dev libxtst-dev qtx11extras5-doc libsodium-dev qttools5-dev \
# libqrencode-dev libqt5svg5-dev asciidoctor libreadline-dev libqt5x11extras5-dev \
# libquazip-dev qtbase5-private-dev ||
# { ERRCODE="Failed to get dependencies for KeepassXC"; errors; return; }
#
# git clone https://github.com/keepassxreboot/keepassxc.git $SECDIR/keepassxc ||
# { ERRCODE="Failed to download KeepassXC"; errors; return; }
#
# cd $SECDIR/keepassxc && git checkout master ||
# { ERRCODE="Failed to check out master branch of KeepassXC"; errors; return; }
#
# mkdir -p $SECDIR/keepassxc/build && cd $SECDIR/keepassxc/build ||
# { ERRCODE="Failed to create and enter KeepassXC build directory"; errors; return; }
#
# cmake -DWITH_XC_ALL=ON -DCMAKE_BUILD_TYPE=Release .. ||
# { ERRCODE="cmake failed to compile KeepassXC"; errors; return; }
#
# make -j8 ||
# { ERRCODE="Failed to make KeepassXC"; errors; return; }
#
# sudo make install ||
# { ERRCODE="Failed to install KeepassXC"; errors; return; }
#fi
#else
if hash snap 2>/dev/null; then
sudo snap install core && sudo snap install keepassxc ||
{ ERRCODE="Failed to install snap / snap core requirements for KeepassXC"; errors; return; }
else
if [[ ${PLAT} = "Linuxmint" ]]; then
if [[ ${PLAT} = "Linuxmint" ]]; then
if [[ -f /etc/apt/preferences.d/nosnap.pref ]]; then
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 && sudo snap install core && sudo snap install keepassxc ||
{ ERRCODE="Failed to install snap / snap core requirements for KeepassXC"; errors; return; }
fi
fi
#fi
}