Skip to content

Commit

Permalink
Homebrew for Mac (#63)
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Detwiler <[email protected]>
  • Loading branch information
detwiler authored Mar 7, 2019
1 parent 5bf9f05 commit 39e1621
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 14 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,13 @@ AM_COND_IF([HAVE_GREP_COLOR],
[AC_SUBST([GREP_COLOR], [$ac_cv_path_GREP_COLOR])
AC_CONFIG_FILES([data/bash/common/bashrc.d/grep.sh])])

## homebrew gnubin paths ##
## homebrew paths ##

AM_COND_IF([HOST_OS_DARWIN],
[QH_VAR_ENSURE([HOMEBREW_PREFIX],
[Homebrew prefix],
[/usr/local])
AC_CONFIG_FILES([data/bash/common/gnubin-pathmung])])
AC_CONFIG_FILES([data/bash/common/homebrew-pathmung])])

## systemd ##

Expand Down
6 changes: 3 additions & 3 deletions data/bash/common/.bashrc.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ fi
pathmung @bindir@
pathmung @sbindir@

# Add Homebrew gnubin directories to PATH
if [ -f "@pkgconfdir@/gnubin-pathmung" ]; then
source "@pkgconfdir@/gnubin-pathmung"
# Add Homebrew directories to PATH
if [ -f "@pkgconfdir@/homebrew-pathmung" ]; then
source "@pkgconfdir@/homebrew-pathmung"
fi

if [ -f "@pkgconfdir@/bashrc" ]; then
Expand Down
2 changes: 1 addition & 1 deletion data/bash/common/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
bashrc
functions
global-bash
gnubin-pathmung
homebrew-pathmung
multi-bash-hack.sh
profile
4 changes: 2 additions & 2 deletions data/bash/common/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ bashrc_h = .bashrc
bashrc = bashrc
functions = functions
global_bash = global-bash
gnubin_pathmung = gnubin-pathmung
homebrew_pathmung = homebrew-pathmung
profile = profile

# data/scripts generated by configure (source file automatically distributed)
conf_data = $(functions) \
$(global_bash)

if HOST_OS_DARWIN
conf_data += $(gnubin_pathmung)
conf_data += $(homebrew_pathmung)
endif

pkgconf_DATA = $(conf_data)
Expand Down
5 changes: 0 additions & 5 deletions data/bash/common/gnubin-pathmung.in

This file was deleted.

13 changes: 13 additions & 0 deletions data/bash/common/homebrew-pathmung.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# vim: ft=sh

# gnubin
for dir in $(find @HOMEBREW_PREFIX@/opt -follow -type d -name gnubin | sort -r); do
pathmung $dir
done

# python3
pathmung @HOMEBREW_PREFIX@/opt/python/libexec/bin
pathmung $HOME/Library/Python/3.7/bin

# llvm
pathmung @HOMEBREW_PREFIX@/opt/llvm/bin
2 changes: 1 addition & 1 deletion data/vim/custom.vim
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set tags+=./tags,tags
runtime! ftplugin/man.vim

if has("cscope")
set cscopeprg=/usr/bin/cscope
set cscopeprg=cscope
set cscopetagorder=0
set cscopetag
set cscopequickfix=s-,c-,d-,i-,t-,e-
Expand Down

0 comments on commit 39e1621

Please sign in to comment.