diff --git a/_sysinit/cloudvm/init.sh b/_sysinit/cloudvm/init.sh index 58d23b7..e827644 100755 --- a/_sysinit/cloudvm/init.sh +++ b/_sysinit/cloudvm/init.sh @@ -13,8 +13,7 @@ sudo apt install -y \ htop \ zoxide \ ranger \ - dtrx \ - exa + dtrx # better find sudo apt install -y fd-find @@ -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="$( diff --git a/_sysinit/ubuntu/packages/system.sh b/_sysinit/ubuntu/packages/system.sh index eac9eec..77d9e6f 100755 --- a/_sysinit/ubuntu/packages/system.sh +++ b/_sysinit/ubuntu/packages/system.sh @@ -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 @@ -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