Commit 74a4fe27 authored by Benedikt Böhm's avatar Benedikt Böhm Committed by Vincent Driessen

restore &> behaviour but with posix compliant shell syntax

parent b22a0764
...@@ -90,12 +90,12 @@ gitflow_init() { ...@@ -90,12 +90,12 @@ gitflow_init() {
echo echo
echo "Summary of actions:" echo "Summary of actions:"
if ! git rev-parse --git-dir >/dev/null; then if ! git rev-parse --git-dir 2>&1 >/dev/null; then
git init --quiet git init --quiet
echo "- A new git repository at $PWD was created" echo "- A new git repository at $PWD was created"
fi fi
if ! git rev-parse --quiet --verify HEAD >/dev/null; then if ! git rev-parse --quiet --verify HEAD 2>&1 >/dev/null; then
touch $README touch $README
git add $README git add $README
git commit --quiet -m "initial commit" git commit --quiet -m "initial commit"
...@@ -105,7 +105,7 @@ gitflow_init() { ...@@ -105,7 +105,7 @@ gitflow_init() {
echo "- An initial commit was created at branch '$MASTER_BRANCH'" echo "- An initial commit was created at branch '$MASTER_BRANCH'"
fi fi
if ! git rev-parse --verify $MASTER_BRANCH >/dev/null; then if ! git rev-parse --verify $MASTER_BRANCH 2>&1 >/dev/null; then
die "Cannot find your master branch. Try: git branch -m <mymaster> $MASTER_BRANCH" die "Cannot find your master branch. Try: git branch -m <mymaster> $MASTER_BRANCH"
fi fi
...@@ -116,7 +116,7 @@ gitflow_init() { ...@@ -116,7 +116,7 @@ gitflow_init() {
gitflow_require_branches_equal $MASTER_BRANCH $ORIGIN/$MASTER_BRANCH gitflow_require_branches_equal $MASTER_BRANCH $ORIGIN/$MASTER_BRANCH
fi fi
if git rev-parse --verify $DEVELOP_BRANCH >/dev/null; then if git rev-parse --verify $DEVELOP_BRANCH 2>&1 >/dev/null; then
gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH
else else
git checkout -q -b $DEVELOP_BRANCH $MASTER_BRANCH git checkout -q -b $DEVELOP_BRANCH $MASTER_BRANCH
......
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