-
-
Save curtis628/07353525ad60234d03520ace3cf64c4e to your computer and use it in GitHub Desktop.
Install Fish Shell 3+ on Raspberry Pi
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 | |
# This helps install the latest fishshell on a Raspberry Pi, and was heavily influenced from | |
# https://gist.github.com/AFRUITPIE/1d26d3d15dc43f821a36d7ccc1260a7f | |
# | |
# NOTE: Along with "make"-related dependencies, it also installs 'jq' | |
# | |
# Use at your own risk as I have made no effort to make this install safe! | |
set -e | |
# Create and change into a build directory | |
BUILD_DIR=/tmp/fish-install | |
mkdir $BUILD_DIR && pushd $BUILD_DIR | |
# Install dependencies plus 'jq' | |
sudo apt-get install -y build-essential cmake ncurses-dev libncurses5-dev libpcre2-dev gettext jq | |
# Download and extract the latest build | |
LATEST_DOWNLOAD_URL=$(curl https://api.github.com/repos/fish-shell/fish-shell/releases/latest | \ | |
jq --raw-output '.assets[] | select(.content_type == "application/x-xz").browser_download_url') | |
wget $LATEST_DOWNLOAD_URL | |
tar -xvf fish-*.tar.xz | |
# 'cd' into the extracted directory | |
cd $(find . -maxdepth 1 -type d -name "fish*") | |
# Build and install | |
cmake . | |
make | |
sudo make install | |
# Add to shells | |
echo /usr/local/bin/fish | sudo tee -a /etc/shells | |
# Set as user's shell | |
chsh -s /usr/local/bin/fish | |
# Delete build directory | |
popd | |
rm -rf $BUILD_DIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To run this in a single command, run the following from your Pi's terminal.