-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit-repos.sh
executable file
·176 lines (157 loc) · 5.99 KB
/
init-repos.sh
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
#!/bin/bash
#
# ./init-repos.sh
# ./init-repos.sh dryrun
#
DRYRUN=$1
GITHUB_REPOS=" \
https://github.com/elvinongbl/dev-machine-env.git \
https://github.com/elvinongbl/self-learning-materials.git \
https://github.com/elvinongbl/devnotes.git \
https://github.com/elvinongbl/dev-machine-setup.git \
https://github.com/elvinongbl/sys-tools.git \
"
PUBLIC_REPOS=" \
https://github.com/chipsec/chipsec.git \
https://git.kernel.org/pub/scm/devel/pahole/pahole.git \
git://sourceware.org/git/elfutils.git \
https://github.com/tianocore/edk2-staging.git \
https://github.com/intel/iotg_tsn_ref_sw.git \
https://github.com/richardcochran/linuxptp.git \
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git \
https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git \
https://git.kernel.org/pub/scm/network/ethtool/ethtool.git \
https://github.com/llvm/llvm-project.git \
https://github.com/open62541/open62541.git \
https://github.com/mirror/busybox.git \
https://github.com/nmap/nmap.git \
https://github.com/a-j-wood/pv.git \
https://github.com/lldpd/lldpd.git \
https://github.com/DPDK/dpdk.git \
https://github.com/wireshark/wireshark.git \
https://github.com/the-tcpdump-group/tcpdump \
https://github.com/the-tcpdump-group/libpcap \
https://github.com/getpatchwork/git-pw \
git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git \
git://github.com/acpica/acpica.git \
https://github.com/yaml/libyaml.git \
"
NETWORKING_REPOS=" \
https://gitlab.com/etherlab.org/ethercat.git \
https://github.com/Mellanox/sockperf.git \
"
BPFXDP_REPOS=" \
https://github.com/xdp-project/xdp-project.git \
https://github.com/xdp-project/xdp-tutorial.git \
https://github.com/xdp-project/bpf-examples.git \
https://github.com/xdp-project/xdp-tools.git \
https://github.com/xdp-project/xdp-cpumap-tc.git \
https://github.com/libbpf/libbpf.git \
https://github.com/libbpf/bpftool.git \
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git \
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git \
https://github.com/polycube-network/polycube.git \
https://github.com/iovisor/bcc.git \
https://github.com/iovisor/bpftrace.git \
"
NETCONF_REPOS=" \
http://git.libssh.org/projects/libssh.git \
https://github.com/CESNET/libnetconf2.git \
https://github.com/CESNET/libyang.git \
https://github.com/CESNET/netopeer2.git \
https://github.com/sysrepo/sysrepo.git \
https://github.com/YangModels/yang.git \
"
LINUX_REPOS=" \
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git \
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git \
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git \
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git \
https://github.com/intel/linux-intel-lts.git \
git://git.kernel.org/pub/scm/devel/sparse/sparse.git \
https://github.com/kuba-moo/nipa.git \
"
YOCTO_REPOS=" \
https://github.com/intel/iotg-yocto-bsp-public.git \
https://git.yoctoproject.org/git/poky \
"
LEARNING_REPOS=" \
https://github.com/bpftools/linux-observability-with-bpf.git \
"
VT_REPOS=" \
https://github.com/libvirt/libvirt.git \
https://github.com/qemu/qemu.git \
"
TRACING_REPOS=" \
git://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git \
git://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git \
https://github.com/bristot/rtsl.git \
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git \
https://github.com/nicolargo/glances.git \
https://github.com/phoronix-test-suite/phoronix-test-suite.git \
https://github.com/intel/pcm \
https://github.com/brendangregg/FlameGraph.git \
https://github.com/brendangregg/perf-tools.git \
"
CLOUDNATIVE_REPOS=" \
https://github.com/CloudNativeDataPlane/cndp.git \
https://github.com/ipdk-io/ipdk.git \
"
K8S_REPOS=" \
https://github.com/kubernetes/kubernetes.git \
https://github.com/kubernetes/cri-api \
https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin.git \
https://github.com/hustcat/k8s-rdma-device-plugin.git \
"
SANDBOX_REPOS=" \
https://github.com/intel-sandbox/personal.bong5.kensho-kit.git \
"
INTEL_REPOS=" \
https://github.com/intel/container-experience-kits.git \
https://github.com/intel/intel-device-plugins-for-kubernetes.git \
"
function run_cmd() {
COLOR='\033[0;36m'
NCOLOR='\033[0m'
echo -e "$COLOR\$ $@ $NCOLOR"
if [ x"$DRYRUN" != x"dryrun" ]; then
eval $@
fi
}
function git_clone_repos() {
NCOLOR='\033[0m'
DESTDIR=$1
shift
REPOS=$@
CWD=$(pwd)
run_cmd mkdir -p $DESTDIR
run_cmd cd $DESTDIR
for url in $REPOS; do
topdir=$(dirname $url)
reponame=$(echo $url | grep -o -P "(?<=$topdir/).*(?=.git)|(?<=$topdir/).*")
if [ ! -d $reponame ]; then
echo -e "${NCOLOR}Cloning ... $DESTDIR/$reponame"
run_cmd git clone --recurse-submodules $url $reponame
else
echo -e "${NCOLOR}Detected ... $DESTDIR/$reponame"
run_cmd cd $DESTDIR/$reponame
run_cmd git pull --rebase
run_cmd cd ..
fi
done
run_cmd cd $CWD
}
git_clone_repos ~/own-repos $GITHUB_REPOS
git_clone_repos ~/public-repos $PUBLIC_REPOS
git_clone_repos ~/public-repos/oss-linux $LINUX_REPOS
git_clone_repos ~/public-repos/oss-yocto $YOCTO_REPOS
git_clone_repos ~/public-repos/oss-bpf $BPFXDP_REPOS
git_clone_repos ~/public-repos/oss-netconf $NETCONF_REPOS
git_clone_repos ~/public-repos/oss-learning $LEARNING_REPOS
git_clone_repos ~/public-repos/oss-virtualization $VT_REPOS
git_clone_repos ~/public-repos/oss-tracing $TRACING_REPOS
git_clone_repos ~/public-repos/oss-networking $NETWORKING_REPOS
git_clone_repos ~/public-repos/oss-cloudnative $CLOUDNATIVE_REPOS
git_clone_repos ~/sandbox-repos $SANDBOX_REPOS
git_clone_repos ~/public-repos/oss-intel $INTEL_REPOS
git_clone_repos ~/public-repos/oss-k8s $K8S_REPOS