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 9687673 commit 9e0ee9b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ else

curl -fsSLo direnv "https://github.com/direnv/direnv/releases/download/v$VERSION/direnv.freebsd-$architecture"

chmod +x direnv
chmod 777 direnv
mv direnv /usr/local/bin/direnv
fi

echo "Updating /etc/bash.bashrc and /etc/zsh/zshrc..."
if [[ "$(cat /etc/bash.bashrc)" != *"$1"* ]]; then
echo -e 'eval "$(direnv hook bash)"' >> /etc/bash.bashrc
fi
if [ -f "/etc/zsh/zshrc" ] && [[ "$(cat /etc/zsh/zshrc)" != *"$1"* ]]; then
echo -e 'eval "$(direnv hook zsh)"' >> /etc/zsh/zshrc
fi

0 comments on commit 9e0ee9b

Please sign in to comment.