Last active
November 7, 2022 10:19
-
-
Save masih/10277869 to your computer and use it in GitHub Desktop.
Installs Fish Shell without root access
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 | |
# Script for installing Fish Shell on systems without root access. | |
# Fish Shell will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
FISH_SHELL_VERSION=2.1.1 | |
# create our directories | |
mkdir -p $HOME/local $HOME/fish_shell_tmp | |
cd $HOME/fish_shell_tmp | |
# download source files for Fish Shell | |
wget http://fishshell.com/files/${FISH_SHELL_VERSION}/fish-${FISH_SHELL_VERSION}.tar.gz | |
# extract files, configure, and compile | |
tar xvzf fish-${FISH_SHELL_VERSION}.tar.gz | |
cd fish-${FISH_SHELL_VERSION} | |
./configure --prefix=$HOME/local --disable-shared | |
make | |
make install |
Thanks for pointing out the typo - they will outlive me I am sure...
I tried to install fish without root permission. My OS is Mac OS. And, fish version is FISH_SHELL_VERSION=3.0.2
.
But, I got something wrong when compiling.
I could compile after changing as following.
# extract files, configure, and compile
tar xvzf fish-${FISH_SHELL_VERSION}.tar.gz
cd fish-${FISH_SHELL_VERSION}
./configure --prefix=$HOME/local --disable-shared
mkdir build; cd build #please insert these two lines
cmake .. -DWITH_GETTEXT=OFF #need this option if using macos
make
make install
I read this issue. Thanks.
The URL needs to be updated a la https://github.com/fish-shell/fish-shell/releases/download/3.0.1/fish-3.0.1.tar.gz
I.e. replace line 10 with
FISH_SHELL_VERSION=3.0.1
and line 17 with
wget http://github.com/fish-shell/fish-shell/releases/download/${FISH_SHELL_VERSION}/fish-${FISH_SHELL_VERSION}.tar.gz
Updated script that can be used to install fish v3.5.1: https://gist.github.com/aidenlx/bfecf5f811a218a6b98bfdaedee8e8e6
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why is the environment variable FHISH_SHELL_VERSION instead of FISH_SHELL_VERSION? Is it some kind of typo?