Forces a newer version of fish from the PPA

This commit is contained in:
2024-10-23 14:48:22 +02:00
parent 4b6ff16d03
commit a486930b32
2 changed files with 18 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_initialized:3100
SETUVAR __fish_initialized:3400
SETUVAR fish_color_autosuggestion:969896
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:b294bb

View File

@@ -151,10 +151,25 @@ function load_gnome_terminal_profiles() {
function install_fish() {
echo "--- Ensuring fish is current shell"
local fish_good=0
if ! which fish 1>/dev/null
then
echo "+++ Installing fish"
run sudo apt-get install -y fish
fish_good=1
fi
local current_version=$(fish --version | cut -d " " -f 3)
if [ $(echo "${current_version}\n3.4.0" | sort | head -1) != "3.4.0" ]
then
echo "Wrong version of fish ${current_version}"
fish_good=1
fi
if [ $fish_good -eq 1 ]
then
echo "+++ Installing fish from PPA"
run sudo add-apt-repository -y ppa:fish-shell/release-3
run sudo apt update
run sudo apt install -y fish
else
echo "+++ Fish is installed"
fi