Add initial beginning to the gitflow subcommand infrastructure.
diff --git a/gitflow b/gitflow
new file mode 100755
index 0000000..f801ff0
--- /dev/null
+++ b/gitflow
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+usage() {
+ echo "usage: gitflow <start|finish> <btype> <args>"
+ echo ""
+ echo "btype can be any of: \"feature\", \"release\", \"hotfix\""
+ echo ""
+}
+
+check_incoming() {
+ if [ "$ACTION" != "start" -a "$ACTION" != "finish" ]; then
+ usage
+ exit 1
+ fi
+
+ if [ "$BTYPE" != "feature" -a "$BTYPE" != "release" -a "$BTYPE" != "hotfix" ]; then
+ usage
+ exit 1
+ fi
+}
+
+gitflow_check_clean_working_tree() {
+ echo "Working tree clean."
+}
+
+if [ $# -lt 2 ]; then
+ usage
+ exit 1
+fi
+
+# Set & check arguments
+export GITFLOW_DIR=$(dirname "$0")
+ACTION="$1"
+BTYPE="$2"
+shift 2
+check_incoming
+
+# Now, $ACTION and $BTYPE are set
+# It's time to call the appropriate subcommand
+. "$GITFLOW_DIR/gitflow-sh-setup"
+. "$GITFLOW_DIR/gitflow-$BTYPE"
+
+if [ "$ACTION" = "start" ]; then
+ start "$@"
+elif [ "$ACTION" = "finish" ]; then
+ finish "$@"
+else
+ usage
+fi
diff --git a/gitflow-hotfix b/gitflow-hotfix
new file mode 100755
index 0000000..aa38ab6
--- /dev/null
+++ b/gitflow-hotfix
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+usage() {
+ echo "usage: gitflow start hotfix <release>"
+ echo " gitflow finish hotfix <release>"
+}
+
+start() {
+ # TODO
+ gitflow_check_clean_working_tree
+ echo "git checkout -b hotfix-$RELEASE master"
+ echo "Bump version number"
+ echo "Fix bug"
+}
+
+finish() {
+ # TODO
+ gitflow_check_clean_working_tree
+ echo "git checkout master"
+ echo "git merge --no-ff hotfix-$RELEASE"
+ echo "git checkout develop"
+ echo "git merge --no-ff hotfix-$RELEASE"
+ echo "git branch -d hotfix-$RELEASE"
+}
+
diff --git a/gitflow-sh-setup b/gitflow-sh-setup
new file mode 100755
index 0000000..462a183
--- /dev/null
+++ b/gitflow-sh-setup
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+gitflow_check_clean_working_tree() {
+ echo "Working tree $(pwd) clean."
+}
+