2024-08-08 19:55:22 -05: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 "yum"; then
|
|
|
|
sudo dnf install rustup -y
|
|
|
|
fish -c "rustup-init"
|
2024-12-06 23:19:21 -06:00
|
|
|
|
|
|
|
fish -c "cargo install cavif"
|
2024-12-07 22:58:29 -06:00
|
|
|
sudo dnf remove rust -y
|
2024-08-08 19:55:22 -05:00
|
|
|
elif command_exists "rpm-ostree"; then
|
|
|
|
sudo wget https://askiiart.net/repos/fedora/x86_64/askiiart.repo -O /etc/yum.repos.d/askiiart.repo
|
|
|
|
rpm-ostree install rustup -y
|
|
|
|
echo "run rustup-init yourself or update the script"
|
|
|
|
elif command_exists "yay"; then
|
|
|
|
yay -S rustup --noconfirm --needed
|
|
|
|
else
|
|
|
|
echo "figure out rustup yourself"
|
|
|
|
echo "enter to continue"
|
|
|
|
read -p ""
|
2024-12-06 22:21:21 -06:00
|
|
|
fi
|