X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=bash_profile;h=5baa82823ea746802ddf945dabb681d4478b95d9;hb=d93b97d10a09e90cbadc08c73faf6b99b2cef245;hp=499dc529e380cd89bf02f5c43419de9ffa085af9;hpb=bd58ef5147bd0d7cfea4148e69d64634bceaa9d6;p=max%2Fdotfiles.git diff --git a/bash_profile b/bash_profile index 499dc52..5baa828 100644 --- a/bash_profile +++ b/bash_profile @@ -7,3 +7,23 @@ export PATH="$PATH:/home/max/bin:$NPM_PACKAGES/bin:$HOME/.rvm/bin" unset MANPATH MANPATH="$NPM_PACKAGES/share/man:$(manpath)" NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH" + +if [ -n "$BASH_VERSION" ]; then + # include .bashrc if it exists + if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" + fi +fi + +if [ -f /etc/bash_completion ]; then + . /etc/bash_completion +fi + +envfile="$HOME/.gnupg/gpg-agent.env" +if [[ -e "$envfile" ]] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then + eval "$(cat "$envfile")" +else + eval "$(gpg-agent --daemon --enable-ssh-support --write-env-file "$envfile")" +fi +export GPG_AGENT_INFO # the env file does not contain the export statement +export SSH_AUTH_SOCK # enable gpg-agent for ssh