You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.2 KiB

#!/usr/bin/env bash
if [[ "${1}" == "-u" ]]; then
echo "Uninstalling passui"
sudo rm /usr/local/bin/passui /usr/share/applications/{org.smolnet.,}passui.desktop
echo "If you wish you can now manually remove the dependencies: wxpython git gnupg pass"
exit 0
elif [[ "${1}" == "-h" ]]; then
echo "Usage: $0 [-u|-h]
-h show this message
-u uninstall passui"
exit 0
fi
python_version=3.9
if [[ -f /usr/bin/apk ]] || [[ -f /sbin/apk ]]; then # PostmarketOS/Alpine
sudo apk add py3-wxpython py3-gnupg git gnupg pass
python_version=3.10
elif [[ -f /usr/bin/apt ]]; then # Mobian/Debian/Ubuntu
sudo apt install python3-wxgtk4.0 python3-gnupg git gnupg pass
elif [[ -f /usr/bin/pacman ]]; then # Arch/Manjaro
sudo pacman -S python-wxpython python-gnupg git gnupg pass
else
echo " This distribution is not supported by this installer.
manually install: wxpython python3-gnupg git gnupg pass
and then copy passui to /usr/local/bin and org.smolnet.passui.desktop to /usr/share/applications/"
exit 1
fi
sudo cp scripts/passui /usr/local/bin/
sudo cp -a src/pass_handler /usr/lib/python${python_version}/site-packages/
sudo cp data/org.smolnet.passui.desktop /usr/share/applications/
exit 0