aboutsummaryrefslogtreecommitdiffstats
path: root/coverity/prepare_source_Osmocom.sh
blob: dae67630979af9d622c6bc802696dc60b816f4b1 (plain)
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
#!/bin/sh
BASEDIR=source-Osmocom

[ -d $BASEDIR ] || mkdir -p $BASEDIR
cd $BASEDIR

for proj in \
  libasn1c \
  libosmo-abis \
  libosmocore \
  libosmo-dsp \
  libosmo-netif \
  libosmo-sccp \
  libsmpp34 \
  libusrp \
  osmo-bsc \
  osmo-msc \
  osmo-mgw \
  osmo-ggsn \
  osmo-gbproxy \
  osmo-sgsn \
  osmo-bts \
  osmo-gmr \
  osmo-iuh \
  osmo-pcu \
  osmo-sysmon \
  osmo-sip-connector \
  osmo-trx \
  osmo-hlr \
  osmocom-bb \
  osmo-smlc \
  osmo-cbc \
  simtrace2 \
  osmo-hnodeb \
  osmo-hnbgw \
  osmo-bsc-nat \
  ; do

	if [ -d $proj ]; then
		if [ -z "$SRC_SKIP_FETCH" ]; then
			(cd $proj && git fetch && git checkout -f -B master origin/master)
		fi
		if [ -n "$SRC_CLEAN" ]; then
			git -C "$proj" clean -ffxd
		fi
	else
		git clone git://git.osmocom.org/$proj
	fi

	# We want to compile tests, but not execute them.  Using 'noinst_PROGRAMS'
	# instead of 'check_PROGRAMS' allows building test binaries during 'make all'.
	files="$(git -C $proj grep -l check_PROGRAMS)"
	if [ -n "$files" ]; then
		(cd $proj && sed -i "s/check_PROGRAMS/noinst_PROGRAMS/" $files)
	fi
done

if ! [ -d layer1-api ]; then
	git clone https://git.sysmocom.de/sysmo-bts/layer1-api
fi