Skip to content
Browse files

Dynamically collect the true git exec path and only if that can not b…

…e found, use the default. Variable GIT_EXEC_PATH remains overwritable explicitly when given as a command to 'make'.
  • Loading branch information...
1 parent a7d4527 commit dd720bea91f948a8231d48bfce7d13ba5731f74e @nvie committed Jan 27, 2010
Showing with 11 additions and 6 deletions.
  1. +1 −1 Makefile
  2. +10 −5 README.mdown
View
2 Makefile
@@ -1,4 +1,4 @@
-GIT_EXEC_PATH=/usr/libexec/git-core
+GIT_EXEC_PATH=`git --exec-path 2>/dev/null || echo /usr/libexec/git-core`
all:
@echo "There is only one target here: install"
View
15 README.mdown
@@ -24,13 +24,18 @@ To install `git-flow` as a real `git` subcommand, run:
$ sudo make install
-By default, this will install `git-flow` into the default Git exec path
-(`/usr/libexec/git-core`). To override this setting in case you have installed
-Git in another location, use:
+By default, this will look for the directory where Git is already installed,
+and install the git-flow extension alongside the other Git subcommands. If git
+is not on the system's `PATH`, it tries `/usr/libexec/git-core`. To explicitly
+override this setting in case you have installed Git in another location, use:
- $ sudo make GIT_EXEC_PATH=/your/git/exec/path install
+ $ sudo make GIT_EXEC_PATH=/your/custom/path install
-Or simply point your `PATH` environment variable to your git-flow checkout.
+You rarely need to override this manually, the default 'make install' should do
+fine.
+
+Or simply point your `PATH` environment variable to your git-flow checkout
+directory.
Please help out

0 comments on commit dd720be

Please sign in to comment.
Something went wrong with that request. Please try again.