Skip to content

Commit

Permalink
Install eza from binary
Browse files Browse the repository at this point in the history
  • Loading branch information
pmendelski committed Oct 29, 2024
1 parent e07a1ee commit e3cf9c0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
16 changes: 14 additions & 2 deletions _sysinit/cloudvm/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ sudo apt install -y \
htop \
zoxide \
ranger \
dtrx \
exa
dtrx

# better find
sudo apt install -y fd-find
Expand Down Expand Up @@ -109,6 +108,19 @@ if [ ! -d "$HOME/.fzf" ]; then
ln -s .fzf/bin/fzf .local/bin/fzf
fi

if ! command -v eza &>/dev/null; then
echo "Installing: eza"
version="$(curl -s "https://api.github.com/repos/eza-community/eza/releases/latest" | grep -Po '"tag_name": "\K[^"]*')"
tmpdir="$(mktemp -d -t eza-XXXX)"
(
cd "$tmpdir" &&
curl -Lo eza.tar.gz "https://github.com/eza-community/eza/releases/download/${version}/eza_x86_64-unknown-linux-gnu.tar.gz" &&
tar xf exa.tar.gz &&
mv eza ~/.local/bin/eza
)
rm -rf "$tmpdir"
fi

# echo -e "\n>>> gcloud"
# if [ ! -d "$HOME/.gcloud" ]; then
# GCLOUD_VERSION="$(
Expand Down
32 changes: 10 additions & 22 deletions _sysinit/ubuntu/packages/system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,16 @@ if ! command -v cheat &>/dev/null; then
fi

if ! command -v eza &>/dev/null; then
# TODO: Migrate to binary install
# https://github.com/eza-community/eza/blob/main/INSTALL.md#manual-linux
sudo mkdir -p /etc/apt/keyrings
wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo gpg --dearmor -o /etc/apt/keyrings/gierens.gpg
echo "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list
sudo chmod 644 /etc/apt/keyrings/gierens.gpg /etc/apt/sources.list.d/gierens.list
sudo apt update
sudo apt install -y eza
echo "Installing: eza"
version="$(curl -s "https://api.github.com/repos/eza-community/eza/releases/latest" | grep -Po '"tag_name": "\K[^"]*')"
tmpdir="$(mktemp -d -t eza-XXXX)"
(
cd "$tmpdir" &&
curl -Lo eza.tar.gz "https://github.com/eza-community/eza/releases/download/${version}/eza_x86_64-unknown-linux-gnu.tar.gz" &&
tar xf exa.tar.gz &&
mv eza ~/.local/bin/eza
)
rm -rf "$tmpdir"
fi

if [ ! -d "$HOME/.fzf" ]; then
Expand All @@ -106,20 +108,6 @@ if [ ! -d "$HOME/.fzf" ]; then
ln -s .fzf/bin/fzf .local/bin/fzf
fi

if ! command -v cheat &>/dev/null; then
echo "Installing: cheat"
version="$(curl -s "https://api.github.com/repos/cheat/cheat/releases/latest" | grep -Po '"tag_name": "\K[^"]*')"
tmpdir="$(mktemp -d -t cheat-XXXX)"
(
cd "$tmpdir" &&
curl -Lo cheat.gz "https://github.com/cheat/cheat/releases/download/${version}/cheat-linux-amd64.gz" &&
gunzip cheat.gz &&
chmod u+x cheat &&
sudo mv cheat /usr/local/bin/cheat
)
rm -rf "$tmpdir"
fi

echo -e "\n>>> Vim & Neovim"
sudo apt install -y vim
# sudo add-apt-repository -y ppa:neovim-ppa/stable
Expand Down

0 comments on commit e3cf9c0

Please sign in to comment.