]> git.friedersdorff.com Git - max/dotfiles.git/blob - bash_profile
Use gpg-agent and set trash folders for imap accounts
[max/dotfiles.git] / bash_profile
1 export NPM_PACKAGES="$HOME/.npm-packages"
2 export EDITOR="/usr/bin/vim"
3 export PAGER="/usr/bin/less"
4 export PATH="/home/max/bin:$NPM_PACKAGES/bin:${PATH}"
5 export PATH="$PATH:/home/max/bin:$NPM_PACKAGES/bin:$HOME/.rvm/bin"
6 [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
7 unset MANPATH
8 MANPATH="$NPM_PACKAGES/share/man:$(manpath)"
9 NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH"
10
11 if [ -n "$BASH_VERSION" ]; then
12   # include .bashrc if it exists
13   if [ -f "$HOME/.bashrc" ]; then
14     . "$HOME/.bashrc"
15   fi
16 fi
17
18 if [ -f /etc/bash_completion ]; then
19   . /etc/bash_completion
20 fi
21
22 envfile="$HOME/.gnupg/gpg-agent.env"
23 if [[ -e "$envfile" ]] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then
24   eval "$(cat "$envfile")"
25 else
26   eval "$(gpg-agent --daemon --enable-ssh-support --write-env-file "$envfile")"
27 fi
28 export GPG_AGENT_INFO  # the env file does not contain the export statement
29 export SSH_AUTH_SOCK   # enable gpg-agent for ssh