Created
October 11, 2010 17:57
-
-
Save mikewest/620949 to your computer and use it in GitHub Desktop.
"Oneliner" to backup your public github repos.
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/sh | |
# Run from a directory in which you'd like to shove a _lot_ of bare repositories. | |
curl -s http://github.com/api/v2/yaml/repos/show/mikewest | grep ':url:' | awk '{ print $2 }' | sed -e 's#http://#git://#' -e 's#$#.git#' | xargs -L 1 git clone --bare |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
aolcm: You're right. You can do everything with a single
sed
command. :)I find it pretty hard to follow, though... using smaller steps makes the whole process a bit clearer to me; I know exactly what each command is doing and can follow the interactions. I think your solution, though surely functional, is simply less readable.