Last active
December 28, 2015 07:58
-
-
Save anscii/7467721 to your computer and use it in GitHub Desktop.
Loop through git branches and pick specific string from every branch
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 | |
# list all branches | |
git for-each-ref --format='%(refname:short)' refs/heads | | |
while read branch; do | |
# if [[ $branch == ru_template32 ]]; then | |
# exit 0 | |
# fi | |
echo $branch | |
git checkout $branch | |
echo $branch >> ~/dev/app_colors.txt | |
grep -Eo "TEAM_COLOR \[UIColor colorWithRed:\([0-9.]+\/[0-9.]+\) green:\([0-9.]+/[0-9.]+\) blue:\([0-9.]+/[0-9.]+\) alpha:1\]" ./app-ios/Customization.h >> ~/dev/app_colors.txt | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment