Project

General

Profile

build_3G.sh

refactored version of build_3G.sh_old (now with functions) - blobb, 04/24/2017 09:34 PM

Download (959 Bytes)

 
1
#!/bin/bash -ex
2

    
3
cloneRepoAndSetCorrectHead(){
4
  cd "$osmo_src"
5
  repo=$(echo $1 | cut -d '/' -f1)
6
  git clone "git://git.osmocom.org/$repo"
7
  cd "$1"
8
  $2
9
  $3
10
}
11

    
12
build() {
13

    
14
  buildDir=$1
15
  make_parallel=$2
16
  not_make_check="$3"
17
  config="$4"
18
  ApplyBranch=$5
19
  orTag=$6
20

    
21
  cloneRepoAndSetCorrectHead "$buildDir" "$ApplyBranch" "$orTag"
22

    
23
  autoreconf -fi
24
  ./configure "$config"
25

    
26
  if [ "$make_parallel" = "" ]; then
27
      make -j4
28
  else
29
      make "$make_parallel"
30
  fi
31

    
32
  if [ "$not_make_check" = "" ]; then
33
      make check
34
  fi
35

    
36
  make install
37
  ldconfig
38
}
39

    
40
osmo_src=$HOME/osmo/src
41
mkdir -p $osmo_src
42

    
43
build "libosmocore"
44
build "libosmo-abis"
45
build "libosmo-netif"
46
build "libosmo-sccp" "" "" "" "git tag -l" "git checkout tags/old_sua"
47
build "libsmpp34" "-j1"
48
build "asn1c" "" "no make check"
49
build "libasn1c"
50
build "osmo-iuh"
51
build "openggsn"
52
build "openbsc/openbsc" "" "" "--enable-iu --enable-mgcp-transcoding" "git checkout vlr_3G"
53
build "osmo-hlr"