Last active
September 21, 2016 11:16
-
-
Save louisswarren/3e7b1f7ffd9114617ad269925e756fb3 to your computer and use it in GitHub Desktop.
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
user="louisswarren" | |
github="https://api.github.com" | |
pyjsonlines="'\n'.join(r[sys.argv[-1]] for r in json.loads(sys.stdin.read()))" | |
pycmd="import sys, json; print($pyjsonlines)" | |
curl -s "$github/users/$user/repos" | python3 -c "$pycmd" git_url | | |
while read x; do | |
git clone "$x" | |
done | |
if [ ! -d gist ]; then | |
mkdir gist; | |
fi | |
cd gist/ | |
curl -s "$github/users/$user/gists" | python3 -c "$pycmd" git_pull_url | | |
while read x; do | |
git clone "$x" | |
done | |
cd ../ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Need second one to replace
https://gist.github.com/
withgit@gist.github.com:
.