Last active
December 20, 2015 05:39
-
-
Save polymetis/6080428 to your computer and use it in GitHub Desktop.
This does all the .git changes we need on preexisting repositories. These changes don't need to committed and this is a destructive process.
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
#!/usr/bin/env bash | |
if [ -e .gitmodules ]; then | |
sed -i 's/https:\/\/github.com\//git@github.com:/g' .git/config | |
awk '/path =/ { print $3 }' .gitmodules | xargs -imetrasub -P10 bash -c "cd .git/modules/metrasub && sed -i 's/https:\/\/github.com\//git@github.com:/g' config" | |
else | |
echo "run this from the top" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment