From fca6f79f463a146eae57133b94b5b07e32b65f78 Mon Sep 17 00:00:00 2001 From: Konano Date: Sat, 14 Sep 2024 11:01:48 +0800 Subject: [PATCH] feat(eza): use apt install when >=24.04 --- configure_priv.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/configure_priv.sh b/configure_priv.sh index 171e88e..9706617 100755 --- a/configure_priv.sh +++ b/configure_priv.sh @@ -85,9 +85,13 @@ configure_install_eza() { elif [[ $(uname -m) != "x86_64" && $(uname -m) != "aarch64" ]]; then echo "eza is not supported on $(uname -m)." elif ! command_exists eza; then - 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 + if [[ "$(lsb_release -is)" == "Ubuntu" && ("$(lsb_release -rs)" == "24.04" || "$(lsb_release -rs)" > "24.04") ]]; then + sudo apt install eza -y + 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 }