Skip to content

Instantly share code, notes, and snippets.

@Fuzzwah
Forked from AFRUITPIE/fish-build-install.sh
Created August 21, 2020 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fuzzwah/18b7a38f957b9251e205e412a512530c to your computer and use it in GitHub Desktop.
Save Fuzzwah/18b7a38f957b9251e205e412a512530c to your computer and use it in GitHub Desktop.
Install Fish Shell 3+ on Raspberry Pi
#!/bin/bash
# This is a quick installer
# script I made to build and install the latest version of
# fish on my Raspberry Pi.
#
# Use at your own risk as I have made no effort to make
# this install safe!
set -e
FISH_VERSION="3.1.2"
# Install dependencies
sudo apt-get install build-essential cmake ncurses-dev libncurses5-dev libpcre2-dev gettext
# Create a build directory
mkdir fish-install
cd fish-install
# Download and extract the latest build (could clone from git but that's less stable)
wget https://github.com/fish-shell/fish-shell/releases/download/$FISH_VERSION/fish-$FISH_VERSION.tar.gz
tar -xzvf fish-$FISH_VERSION.tar.gz
cd fish-$FISH_VERSION
# 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
cd ../../
rm -rf fish-install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment