Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@todgru
Forked from mralexgray/cloneall.sh
Created January 25, 2013 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todgru/4630524 to your computer and use it in GitHub Desktop.
Save todgru/4630524 to your computer and use it in GitHub Desktop.
#!/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