-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrepo-clone.bash
executable file
·50 lines (36 loc) · 1.85 KB
/
repo-clone.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#! /bin/bash
GO_SRC=/home/arnob/go/src/
# curl -L \
# -H "Accept: application/vnd.github+json" \
# -H "Authorization: Bearer <YOUR-TOKEN>" \
# -H "X-GitHub-Api-Version: 2022-11-28" \
# https://api.github.com/orgs/ORG/repos
declare -A ar
ar[0]="kubedb.dev kubedb apimachinery autoscaler cli crd-manager db-client-go docs elasticsearch installer kafka mariadb
mongodb mongodb-init-docker mongodb-restic-plugin mysql ops-manager postgres redis schema-manager tests ui-server webhook-server"
ar[1]="kubeops.dev kubeops falco-ui-server installer panopticon scanner sidekick trivydb-docker ui-server"
ar[2]="go.bytebuilders.dev appscode-cloud b3 catalog catalog-manager cluster-presets cluster-ui grafana installer kubedb-ui platform-ui launchpad
lib-selfhost license-proxyserver service-provider ui-wizards"
ar[4]="stash.appscode.dev stashed apimachinery enterprise installer mongodb"
ar[5]="kubestash.dev kubestash addon-template apimachinery installer kubedb-manifest kubestash"
ar[5]="kmodules.xyz kmodules client-go codespan-schema-checker controller-runtime custom-resources offshoot-api resource-metadata resource-metrics webhook-runtime"
ar[6]="kubepack.dev kubepack chart-doc-gen kubepack lib-app lib-helm"
ar[7]="go.appscode.dev appscode alerts blog grafana-dashboards"
ar[8]="github.com/Arnobkumarsaha ArnobKumarSaha basic-k8s-client bashscripting bytebuilders-files kubedb-files kubestash-files oauth"
for i in ${!ar[@]}
do
x=${ar[$i]}
line=($x)
mkdir -p ${GO_SRC}/${line[0]}
cd ${GO_SRC}/${line[0]}
for (( i=2; i<${#line[@]}; i++ ));
do
git clone [email protected]:${line[1]}/${line[$i]}.git
done
done
# Different approach
# repos=(kubestash.dev kubestash addon-template apimachinery installer kubedb-manifest kubestash mongodb)
# for repo in ${repos[@]}
# do
# git clone [email protected]:${ORG}/${repo}.git
# done