Skip to content

Commit

Permalink
Added a nicer way of installing/uninstalling git-flow.
Browse files Browse the repository at this point in the history
Now also installs the shFlags.sh script. (The license lines are included in its header.)
  • Loading branch information
nvie committed Feb 2, 2010
1 parent c3948cf commit c3b7db9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
26 changes: 16 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion git-flow
Original file line number Diff line number Diff line change
Expand Up @@ -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 $?
Expand Down
1 change: 1 addition & 0 deletions shFlags.sh

0 comments on commit c3b7db9

Please sign in to comment.