aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/jenkins.sh
blob: e1564a7a7f1f5b7b10c285a5f73af3902ee6ee9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
set -e -x

# Clone repository to ~/, or update existing
# $1: name of osmocom project
clone_repo() {
	cd ~/"$1" || (cd ~/ && git clone git://git.osmocom.org/"$1" && cd ~/"$1")
	git rev-parse HEAD
	git status

	git fetch && git checkout -f -B master origin/master

	git rev-parse HEAD
	git status
}

clone_repo osmo-ci
clone_repo osmo-gsm-manuals

if [ `uname` = "Linux" ] && [ "x${OSMO_CI_NO_DOCKER}" != "x1" ]; then
	cd ~/osmo-ci
	scripts/osmo-ci-docker-rebuild.sh
fi