-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path04_ocp_repo_sync.sh
executable file
·47 lines (33 loc) · 1.6 KB
/
04_ocp_repo_sync.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
#!/bin/bash
set -ex
source common.sh
eval "$(go env)"
echo "$GOPATH" | lolcat # should print $HOME/go or something like that
function sync_go_repo_and_patch {
DEST="$GOPATH/src/$1"
figlet "Syncing $1" | lolcat
if [ ! -d $DEST ]; then
mkdir -p $DEST
git clone $2 $DEST
fi
pushd $DEST
git am --abort || true
git checkout master
git pull --rebase origin master
git branch -D we_dont_need_no_stinkin_patches || true
git checkout -b we_dont_need_no_stinkin_patches
shift; shift;
for arg in "$@"; do
curl -L $arg | git am
done
popd
}
sync_go_repo_and_patch github.com/openshift/origin https://github.com/openshift/origin.git
sync_go_repo_and_patch github.com/openshift/release https://github.com/openshift/release.git
sync_go_repo_and_patch github.com/openshift/machine-config-operator https://github.com/openshift/machine-config-operator.git
sync_go_repo_and_patch github.com/openshift/machine-api-operator https://github.com/openshift/machine-api-operator.git
sync_go_repo_and_patch github.com/openshift/installer https://github.com/openshift/installer.git
sync_go_repo_and_patch github.com/terraform-providers/terraform-provider-openstack https://github.com/terraform-providers/terraform-provider-openstack
sync_go_repo_and_patch github.com/openshift/ci-operator https://github.com/openshift/ci-operator.git
sync_go_repo_and_patch github.com/sallyom/installer-e2e https://github.com/sallyom/installer-e2e.git
sync_go_repo_and_patch sigs.k8s.io/openshift/cluster-api-provider-openstack https://github.com/openshift/cluster-api-provider-openstack.git