feat(eza): use apt install when >=24.04

This commit is contained in:
Konano 2024-09-14 11:01:48 +08:00
parent 76774e7116
commit fca6f79f46
Signed by: Nano
GPG Key ID: 93686B78EE43A65A

View File

@ -85,9 +85,13 @@ configure_install_eza() {
elif [[ $(uname -m) != "x86_64" && $(uname -m) != "aarch64" ]]; then elif [[ $(uname -m) != "x86_64" && $(uname -m) != "aarch64" ]]; then
echo "eza is not supported on $(uname -m)." echo "eza is not supported on $(uname -m)."
elif ! command_exists eza; then elif ! command_exists eza; then
unzip $scriptdir/files/eza_$(uname -m)-unknown-linux-musl.zip -d $tempdir/eza if [[ "$(lsb_release -is)" == "Ubuntu" && ("$(lsb_release -rs)" == "24.04" || "$(lsb_release -rs)" > "24.04") ]]; then
sudo cp $tempdir/eza/eza /usr/local/bin/ sudo apt install eza -y
rm $tempdir/eza -r else
unzip $scriptdir/files/eza_$(uname -m)-unknown-linux-musl.zip -d $tempdir/eza
sudo cp $tempdir/eza/eza /usr/local/bin/
rm $tempdir/eza -r
fi
fi fi
} }