Permalink
Browse files

Added a nicer way of installing/uninstalling git-flow.

Now also installs the shFlags.sh script. (The license lines are included in its header.)
  • Loading branch information...
1 parent c3948cf commit c3b7db9d2a8d06d681c05d7cabc4e7de55de63f8 @nvie committed Feb 2, 2010
Showing with 18 additions and 11 deletions.
  1. +16 −10 Makefile
  2. +1 −1 git-flow
  3. +1 −0 shFlags.sh
View
@@ -1,20 +1,26 @@
GIT_EXEC_PATH=`git --exec-path 2>/dev/null || echo /usr/libexec/git-core`
+# files that need mode 755
+EXEC_FILES=git-flow
+
+# files that need mode 644
+SCRIPT_FILES =git-flow-feature
+SCRIPT_FILES+=git-flow-hotfix
+SCRIPT_FILES+=git-flow-release
+SCRIPT_FILES+=git-flow-support
+SCRIPT_FILES+=git-flow-version
+SCRIPT_FILES+=shFlags.sh
+
all:
@echo "usage: make install"
@echo " make uninstall"
install:
- # TODO: Add installation of shFlags to this file too
install -d -m 0755 $(GIT_EXEC_PATH)
- install -m 0755 git-flow $(GIT_EXEC_PATH)
- install -m 0644 \
- git-flow-feature \
- git-flow-hotfix \
- git-flow-release \
- git-flow-support \
- git-flow-version \
- $(GIT_EXEC_PATH)
+ install -m 0755 $(EXEC_FILES) $(GIT_EXEC_PATH)
+ install -m 0644 $(SCRIPT_FILES) $(GIT_EXEC_PATH)
uninstall:
- test -d $(GIT_EXEC_PATH) && rm -f $(GIT_EXEC_PATH)/git-flow*
+ test -d $(GIT_EXEC_PATH) && \
+ cd $(GIT_EXEC_PATH) && \
+ rm -f $(EXEC_FILES) $(SCRIPT_FILES)
View
@@ -54,7 +54,7 @@ main() {
fi
# use the shFlags project to parse the command line arguments
- . "$GITFLOW_DIR/shFlags/src/shflags"
+ . "$GITFLOW_DIR/shFlags.sh"
#DEFINE_boolean quiet 0 'run without output' q
#DEFINE_boolean verbose 0 'run verbose (more output)' v
FLAGS "$@" || exit $?
View

0 comments on commit c3b7db9

Please sign in to comment.