Commit c3b7db9d authored by Vincent Driessen's avatar Vincent Driessen

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

Now also installs the shFlags.sh script. (The license lines are included in its header.)
parent c3948cf8
GIT_EXEC_PATH=`git --exec-path 2>/dev/null || echo /usr/libexec/git-core` 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: all:
@echo "usage: make install" @echo "usage: make install"
@echo " make uninstall" @echo " make uninstall"
install: install:
# TODO: Add installation of shFlags to this file too
install -d -m 0755 $(GIT_EXEC_PATH) install -d -m 0755 $(GIT_EXEC_PATH)
install -m 0755 git-flow $(GIT_EXEC_PATH) install -m 0755 $(EXEC_FILES) $(GIT_EXEC_PATH)
install -m 0644 \ install -m 0644 $(SCRIPT_FILES) $(GIT_EXEC_PATH)
git-flow-feature \
git-flow-hotfix \
git-flow-release \
git-flow-support \
git-flow-version \
$(GIT_EXEC_PATH)
uninstall: 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)
...@@ -54,7 +54,7 @@ main() { ...@@ -54,7 +54,7 @@ main() {
fi fi
# use the shFlags project to parse the command line arguments # 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 quiet 0 'run without output' q
#DEFINE_boolean verbose 0 'run verbose (more output)' v #DEFINE_boolean verbose 0 'run verbose (more output)' v
FLAGS "$@" || exit $? FLAGS "$@" || exit $?
......
shFlags/src/shflags
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment