Skip to content

Commit

Permalink
Update install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbhmr authored Aug 17, 2023
1 parent f991cfc commit d0c2971
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down

0 comments on commit d0c2971

Please sign in to comment.