Fixes fish version check

This commit is contained in:
2025-05-13 16:14:17 +02:00
parent 5f80da627b
commit 940b7b3efe

View File

@@ -152,13 +152,18 @@ function load_gnome_terminal_profiles() {
function install_fish() { function install_fish() {
echo "--- Ensuring fish is current shell" echo "--- Ensuring fish is current shell"
local fish_good=0 local fish_good=0
if ! which fish 1>/dev/null if ! which fish 1>/dev/null
then then
fish_good=1 fish_good=1
fi fi
local current_version=$(fish --version | cut -d " " -f 3) local current_version=$(fish --version | cut -d " " -f 3)
if [ $(echo "${current_version}\n3.4.0" | sort | head -1) != "3.4.0" ] local current_version_test=$(cat <<EOF
${current_version}
3.4.0
EOF
)
if [ $(echo "${current_version_test}" | sort | head -1) != "3.4.0" ]
then then
echo "Wrong version of fish ${current_version}" echo "Wrong version of fish ${current_version}"
fish_good=1 fish_good=1