✨ (install.sh): update eza installation logic to install via cargo if Rust is not present, removing previous GPG and repository setup steps
This commit is contained in:
19
install.sh
19
install.sh
@@ -48,16 +48,15 @@ install_eza_fallback() {
|
|||||||
echo "Attempting fallback installation of eza..."
|
echo "Attempting fallback installation of eza..."
|
||||||
case $os in
|
case $os in
|
||||||
ubuntu|debian)
|
ubuntu|debian)
|
||||||
# Ensure gpg exists and add the community repo
|
# Install cargo if it doesn't exist
|
||||||
command -v gpg &> /dev/null || sudo apt-get install -y gpg
|
if ! command -v cargo &> /dev/null; then
|
||||||
sudo mkdir -p /etc/apt/keyrings
|
echo "Installing Rust and cargo..."
|
||||||
wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | \
|
sudo apt-get update
|
||||||
sudo gpg --dearmor -o /etc/apt/keyrings/gierens.gpg
|
sudo apt-get install -y curl build-essential
|
||||||
echo "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | \
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
sudo tee /etc/apt/sources.list.d/gierens.list
|
source ~/.cargo/env
|
||||||
sudo chmod 644 /etc/apt/keyrings/gierens.gpg /etc/apt/sources.list.d/gierens.list
|
fi
|
||||||
sudo apt-get update
|
cargo install eza
|
||||||
sudo apt-get install -y eza
|
|
||||||
;;
|
;;
|
||||||
fedora)
|
fedora)
|
||||||
sudo dnf install -y eza || {
|
sudo dnf install -y eza || {
|
||||||
|
|||||||
Reference in New Issue
Block a user