-
Notifications
You must be signed in to change notification settings - Fork 1
/
clone-github
executable file
·38 lines (31 loc) · 1.01 KB
/
clone-github
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
#!/bin/bash
MAKEBINPKG="goes-build fe1 platina-linux-kernel platina-mk1-ttys platina-mk1-release goes"
MAKEGBPPKG="golang-1.16 ethtool flashrom makedumpfile lm-sensors crash xeth onie kexec-tools i2cipc platina-repos"
MAKEKERNELPKG="coreboot goes-boot goes-bmc linux u-boot"
declare -A BRANCHES
BRANCHES["golang-1.16"]="golang-1.16"
BRANCHES["fe1"]="master"
BRANCHES["i2cipc"]="main"
BRANCHES["linux"]="platina-5.10.y"
BRANCHES["onie"]="main"
BRANCHES["platina-repos"]="main"
BRANCHES["u-boot"]="goes-2.0"
BRANCHES["xeth"]="main"
function getbranch()
{
b="${BRANCHES[$1]}"
[ -n "$b" ] || b="master"
echo "$b"
}
for repo in $MAKEBINPKG; do
rm -rf $repo
git clone --depth 1 -b `getbranch $repo` https://github.com/platinasystems/$repo
done
for repo in $MAKEGBPPKG; do
rm -rf $repo
git clone --depth 1 --no-single-branch -b `getbranch $repo` https://github.com/platinasystems/$repo
done
for repo in $MAKEKERNELPKG; do
rm -rf $repo
git clone -b `getbranch $repo` https://github.com/platinasystems/$repo
done