From d5245eab46e76a27ae3d74159ed7bfa5a9696b11 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Mon, 11 Nov 2019 11:20:24 +0100 Subject: [PATCH] Keep installation prefix in the environment --- dotfiles/.config/bash/profile | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/dotfiles/.config/bash/profile b/dotfiles/.config/bash/profile index f7b3392..a4e65b7 100644 --- a/dotfiles/.config/bash/profile +++ b/dotfiles/.config/bash/profile @@ -18,16 +18,12 @@ export LC_CTYPE="en_US.UTF-8" export LESS="-i -j.49 -M -R -z-2" export LESSHISTFILE="$XDG_CACHE_HOME/less/history" export LESSHISTSIZE=1000 +export LOCAL_PREFIX="/usr/local" +[ command -v brew &>/dev/null ] && LOCAL_PREFIX=$(brew --prefix) export PAGER=less export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/startup.py" export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC' -# Find out where Homebrew performs installations. If Homebrew is not -# installed (e.g. running on Linux), assume /usr/local for our -# installations. -prefix=/usr/local -if command -v brew &>/dev/null; then prefix=$(brew --prefix); fi - # Prevent path_helper from messing with the PATH when starting tmux. # See: https://superuser.com/a/583502 if [ "$(uname)" == "Darwin" ]; then @@ -43,10 +39,10 @@ while read -r bindir; do PATH="$bindir:$PATH" fi done <