-
-
Save zjhiphop/6989981 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 | |
# Issue arbitary git command for each of the sub modules. | |
# E.g. git-bundle checkout feature/docs | |
# Check out the feature/docs branch for each of the sub module. | |
function print_header | |
{ | |
printf '%.0s-' {1..30} && echo | |
echo $1 | |
printf '%.0s-' {1..30} && echo | |
} | |
# Blobing pattern for directories, replace with whatever u like. | |
PATTERN="**/troopjs-*" | |
# Pass all params to git command. | |
COMMAND=$@ | |
for i in $PATTERN | |
do | |
print_header $i && cd $PWD/$i && git $COMMAND && printf '\n\n\n' | |
done | |
exit 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment