git-shell-commands/mirror-github-org

13 lines
203 B
Text
Raw Normal View History

#!/usr/bin/env sh
2019-02-18 14:15:57 +00:00
source "$(dirname "$0")/pre-script"
2019-02-18 14:15:57 +00:00
mkdir "$1"
(
cd "$1"
curl -s "https://api.github.com/orgs/$1/repos?per_page=200" | \
2019-02-18 14:35:10 +00:00
jq .[].clone_url | \
2019-02-18 14:15:57 +00:00
xargs -n 1 git clone --mirror
)