Created
March 18, 2014 09:31
-
-
Save richardneish/9616628 to your computer and use it in GitHub Desktop.
Scripts to operate on a set of Git repositories from the parent directory
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 | |
BASE_DIR=$(dirname $0) | |
for d in * | |
do | |
"${BASE_DIR}/git-do" "${d}" $* | |
done |
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 | |
GIT_REPO=$1 | |
shift | |
if [ -d "${GIT_REPO}" ] && [ -d "${GIT_REPO}/.git" ] | |
then | |
echo ${GIT_REPO} | |
pushd "${GIT_REPO}" > /dev/null | |
git $* | |
popd > /dev/null | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment