Add install-fish

This commit is contained in:
askiiart 2023-09-13 10:17:03 -05:00
parent afc1708bf5
commit 7e8acc3f96
No known key found for this signature in database
GPG key ID: 94789D499CBE78CE

30
install-stuff/install-fish.bash Executable file
View file

@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -e
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
sudo apt-get install fish -y
elif command_exists "yum"; then
sudo yum install fish -y
elif command_exists "pacman"; then
yay -S fish
elif command_exists "zypp"; then
# Untested
sudo zypper install fish -y
elif command_exists "emerge"; then
sudo echo Not yet supported, exiting...
exit
elif command_exists "apk"; then
sudo apk add fish
else
echo "Unsupported: unknown package manager and distro"
exit
fi
chsh -s $(which fish)