git-shell-commands/mirror-github-org
Billy Brawner 9eae3ed258 Add pre-script to switch to correct directory for each command
Signed-off-by: Billy Brawner <billy@wbrawner.com>
2019-12-22 16:51:45 -06:00

12 lines
203 B
Bash
Executable file

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