Created
July 6, 2016 07:29
-
-
Save artifactsauce/4230125a9410400e3c7ee2fbd34f9606 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
LOGGER_LOG_LEVEL=4 | |
BASE_DIR=$(pwd) | |
LIB_DIR=$HOME/src/github.com/artifactsauce/proglets/lib/bash | |
. $LIB_DIR/functions | |
. $LIB_DIR/logger | |
while read | |
do | |
[[ "$REPLY" =~ ^\# ]] && continue | |
BRANCH='feature/fix-bug' | |
logger.debug "Change the repository to $REPLY" | |
logger.debug "Change the beanch to $BRANCH" | |
cd $REPLY | |
git fetch -p | |
if [[ -n $(git branch | grep $BRANCH) ]]; then | |
git checkout $BRANCH | |
elif [[ -n $(git ls-remote origin | grep $BRANCH) ]]; then | |
git checkout -b $BRANCH origin/$BRANCH | |
else | |
# git checkout master | |
: | |
fi | |
git pull | |
# git push --set-upstream origin topic/fix-bug | |
cd $BASE_DIR | |
done <<EOS | |
bot | |
cookbook-h2o | |
EOS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment