Last active
February 3, 2019 09:43
-
-
Save Napear/733fe2945f69abd945a242b293e7f6b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "[!!] This script must be run as root" | |
exit 1 | |
fi | |
wget -nv https://download.opensuse.org/repositories/shells:fish:release:2/Debian_9.0/Release.key -O Release.key | |
apt-key add - < Release.key | |
echo 'deb http://download.opensuse.org/repositories/shells:/fish:/release:/2/Debian_9.0/ /' > /etc/apt/sources.list.d/shells:fish:release:2.list | |
apt-get update | |
apt-get install fish | |
echo /usr/local/bin/fish | tee -a /etc/shells | |
# If username passed as ARG, will be set as that users default shell | |
if [[ $# -eq 1 ]]; then | |
su $1 -c "chsh -s /usr/local/bin/fish" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment