configs/install-stuff/install-vesktop.bash

25 lines
1.2 KiB
Bash
Raw Normal View History

2023-11-18 20:02:28 -06:00
#!/usr/bin/env bash
if [ $(whoami) == "root" ]; then
echo "Run as a normal user, not root"
exit 1
fi
command_exists() { type "$1" &>/dev/null; }
if command_exists "apt-get"; then
2024-03-17 18:56:48 -05:00
curl -LO $(curl -s https://api.github.com/repos/Vencord/Vesktop/releases/latest | grep "vesktop_.*_amd64.deb" | head --lines 1 | cut -d : -f 2,3 | tr -d \")
sudo apt-get install ./vesktop_*.deb -y
2024-07-10 13:21:06 -05:00
elif command_exists "dnf"; then
sudo dnf install $(curl -s https://api.github.com/repos/Vencord/Vesktop/releases/latest | grep "browser_download_url.*vesktop-.*.x86_64.rpm" | head --lines 1 | cut -d : -f 2,3 | tr -d \")
elif command_exists "rpm-ostree"; then
rpm-ostree install $(curl -s https://api.github.com/repos/Vencord/Vesktop/releases/latest | grep "browser_download_url.*vesktop-.*.x86_64.rpm" | head --lines 1 | cut -d : -f 2,3 | tr -d \")
2024-04-20 20:35:22 -05:00
elif command_exists "yay"; then
2024-02-20 12:14:03 -06:00
yay -S vesktop-bin --noconfirm --needed
elif command_exists "xbps-install"; then
2024-04-18 08:33:31 -05:00
cd ~/Applications
2024-04-20 20:35:22 -05:00
curl -LO $(curl -s https://api.github.com/repos/Vencord/Vesktop/releases/latest | grep "browser_download_url.*Vesktop-.*.AppImage" | tail --lines 1 | cut -d : -f 2,3 | tr -d \")
2024-04-18 08:33:31 -05:00
cd -
2023-11-18 20:02:28 -06:00
else
echo "IDK, check the repo: https://github.com/Vencord/Vesktop"
fi