From 39e1621bebd5ac03e81f6aa6e712bc0548e37f72 Mon Sep 17 00:00:00 2001 From: Mike Detwiler Date: Thu, 7 Mar 2019 17:49:43 -0500 Subject: [PATCH] Homebrew for Mac (#63) Signed-off-by: Mike Detwiler --- configure.ac | 4 ++-- data/bash/common/.bashrc.in | 6 +++--- data/bash/common/.gitignore | 2 +- data/bash/common/Makefile.am | 4 ++-- data/bash/common/gnubin-pathmung.in | 5 ----- data/bash/common/homebrew-pathmung.in | 13 +++++++++++++ data/vim/custom.vim | 2 +- 7 files changed, 22 insertions(+), 14 deletions(-) delete mode 100644 data/bash/common/gnubin-pathmung.in create mode 100644 data/bash/common/homebrew-pathmung.in diff --git a/configure.ac b/configure.ac index 33a2b64..5756784 100644 --- a/configure.ac +++ b/configure.ac @@ -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 ## diff --git a/data/bash/common/.bashrc.in b/data/bash/common/.bashrc.in index 744797f..5c72a9b 100644 --- a/data/bash/common/.bashrc.in +++ b/data/bash/common/.bashrc.in @@ -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 diff --git a/data/bash/common/.gitignore b/data/bash/common/.gitignore index 3ad9035..c9f3653 100644 --- a/data/bash/common/.gitignore +++ b/data/bash/common/.gitignore @@ -6,6 +6,6 @@ bashrc functions global-bash -gnubin-pathmung +homebrew-pathmung multi-bash-hack.sh profile diff --git a/data/bash/common/Makefile.am b/data/bash/common/Makefile.am index 113f3fc..9935e66 100644 --- a/data/bash/common/Makefile.am +++ b/data/bash/common/Makefile.am @@ -11,7 +11,7 @@ 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) @@ -19,7 +19,7 @@ conf_data = $(functions) \ $(global_bash) if HOST_OS_DARWIN -conf_data += $(gnubin_pathmung) +conf_data += $(homebrew_pathmung) endif pkgconf_DATA = $(conf_data) diff --git a/data/bash/common/gnubin-pathmung.in b/data/bash/common/gnubin-pathmung.in deleted file mode 100644 index 432cd14..0000000 --- a/data/bash/common/gnubin-pathmung.in +++ /dev/null @@ -1,5 +0,0 @@ -# vim: ft=sh - -for dir in $(find @HOMEBREW_PREFIX@/opt -follow -type d -name gnubin | sort -r); do - pathmung $dir -done diff --git a/data/bash/common/homebrew-pathmung.in b/data/bash/common/homebrew-pathmung.in new file mode 100644 index 0000000..319ef28 --- /dev/null +++ b/data/bash/common/homebrew-pathmung.in @@ -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 diff --git a/data/vim/custom.vim b/data/vim/custom.vim index d3ffedb..cace71a 100644 --- a/data/vim/custom.vim +++ b/data/vim/custom.vim @@ -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-