Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # This script executes action in each defined repo
- basedir=${BASEDIR:-$HOME/repos}
- repos="sti-base sti-ruby sti-nodejs sti-python sti-php sti-perl mysql mongodb postgresql"
- function do_action {
- local action_name="$1";shift
- case "$action_name" in
- list-pr)
- echo "$(basename `pwd`):"
- hub issue | grep --color=never pull
- ;;
- commit-all)
- echo "$(basename `pwd`):"
- git checkout -b $1
- git add .
- git commit -m "$2"
- ;;
- push-all)
- echo "$(basename `pwd`):"
- git push origin $1
- ;;
- pull-all)
- echo "$(basename `pwd`):"
- hub pull-request -i "$1" -m "$2"
- ;;
- *)
- echo "ERROR: unknown action ${action_name}"
- esac
- }
- for d in $repos; do
- pushd "${basedir}/${d}" >/dev/null; do_action $@; popd >/dev/null
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement