####################################### # APPEND this to your .bashrc ####################################### # Source local .bashrc customization from this file if [ -f ~/.bashrc_local ]; then . ~/.bashrc_local fi # Source local aliases from this file if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi export PS1="\[$(tput bold)\]\[\033[48;5;139m\]\w\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;15m\]\\$ \[$(tput sgr0)\]" vaulthelper() { if [ $(ifconfig | grep -A2 '^utun[0-9]:' | grep -c '[[:space:]]inet 172.31.251') -eq 1 ]; then $(~/git/vault-helper -keychain -username $(id -un)); launchctl setenv VAULT_TOKEN $VAULT_TOKEN else echo "You're not connected to Unic VPN, vaulthelper won't work" fi } if [ -z $(launchctl getenv VAULT_TOKEN) ] then vaulthelper else export VAULT_TOKEN=$(launchctl getenv VAULT_TOKEN) fi # Fetch a Splunk auth token for ansible history if [ ! -z $VAULT_TOKEN ]; then export SPLUNK_AUTHTOKEN=$(curl -X GET https://vault.unic.com/api/v1/secrets/14730/fields/api-key -H "Authorization: Bearer $VAULT_TOKEN" -s | tr -d \"); else echo "Splunk: \$VAULT_TOKEN not set"; fi test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash" ulimit -n 1024 # >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/Users/oliver.ladner/opt/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__conda_setup" else if [ -f "/Users/oliver.ladner/opt/miniconda3/etc/profile.d/conda.sh" ]; then . "/Users/oliver.ladner/opt/miniconda3/etc/profile.d/conda.sh" else export PATH="/Users/oliver.ladner/opt/miniconda3/bin:$PATH" fi fi unset __conda_setup # <<< conda initialize <<<