|
|
|
@ -17,7 +17,8 @@ function list_starred_repos { |
|
|
|
|
REPOS="" |
|
|
|
|
for PAGE in `seq $PAGES`; do |
|
|
|
|
REPOS+=" $( |
|
|
|
|
curl -sH "Accept: application/vnd.github.v3.star+json" "https://api.github.com/users/$USER/starred?per_page=100&page=$PAGE" | |
|
|
|
|
curl -sH "Accept: application/vnd.github.v3.star+json" \ |
|
|
|
|
"https://api.github.com/users/$USER/starred?per_page=100&page=$PAGE" | |
|
|
|
|
jq -r '.[]|[.repo.full_name][0]' | |
|
|
|
|
grep -v eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee |
|
|
|
|
)" |
|
|
|
@ -31,11 +32,11 @@ function list_starred_repos { |
|
|
|
|
function fetch_starred_repos { |
|
|
|
|
for SHORTNAME in $(list_starred_repos); do |
|
|
|
|
UN="$(echo $SHORTNAME | cut -d'/' -f1)" |
|
|
|
|
if [[ ! -d "$SHORTNAME" ]]; then |
|
|
|
|
if [[ ! -d "$UN" ]]; then |
|
|
|
|
mkdir -p $UN |
|
|
|
|
if [[ ! -d "dl/$SHORTNAME" ]]; then |
|
|
|
|
if [[ ! -d "dl/$UN" ]]; then |
|
|
|
|
mkdir -p dl/$UN |
|
|
|
|
fi |
|
|
|
|
git clone https://github.com/$SHORTNAME $SHORTNAME |
|
|
|
|
git clone https://github.com/$SHORTNAME dl/$SHORTNAME |
|
|
|
|
fi |
|
|
|
|
done |
|
|
|
|
} |
|
|
|
|