From d0c2971fc1532d11f998340383083b70f15a3dea Mon Sep 17 00:00:00 2001 From: Jacob Hummer Date: Thu, 17 Aug 2023 15:03:56 -0500 Subject: [PATCH] Update install.sh --- install.sh | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/install.sh b/install.sh index 9954cdd..cb7b292 100644 --- a/install.sh +++ b/install.sh @@ -6,26 +6,8 @@ if [[ $VERSION == system ]]; then sudo apt-get update sudo apt-get install -y direnv else - # https://stackoverflow.com/a/48679640/19522682 - architecture="" - case $(uname -m) in - i386) architecture="386" ;; - i686) architecture="386" ;; - x86_64) architecture="amd64" ;; - arm) dpkg --print-architecture | grep -q "arm64" && architecture="arm64" || architecture="arm" ;; - esac - - check_packages curl ca-certificates grep - - if [[ $VERSION == latest ]]; then - # https://stackoverflow.com/a/3077316/19522682 - VERSION=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/direnv/direnv/releases/latest | grep -oP '\d+\.\d+\.\d+') - fi - - curl -fsSLo direnv "https://github.com/direnv/direnv/releases/download/v$VERSION/direnv.freebsd-$architecture" - - chmod 777 direnv - mv direnv /usr/local/bin/direnv + export bin_path=/usr/local + curl -sfL https://direnv.net/install.sh | bash fi echo "Updating /etc/bash.bashrc and /etc/zsh/zshrc..."