-
-
Save mralexgray/3822765 to your computer and use it in GitHub Desktop.
Clone all my gists
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 | |
#cloneall.sh by Jan-Piet Mens, February 2012 | |
# Obtain a list of gists (mine) and clone them into the current directory | |
# Requires jsonpipe (https://github.com/dvxhouse/jsonpipe) | |
URL=http://gist.github.com/api/v1/json/gists/jpmens | |
CLONEURLFMT="git://gist.github.com/%d.git\n" | |
curl -qs $URL | | |
jsonpipe -s ' ' | | |
awk '$3 == "repo" { gsub(/\"/, "", $4); printf("'$CLONEURLFMT'", $4); }' | | |
while read repo | |
do | |
git clone $repo | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment