3 # Get Command Line arguements if present
5 if [ "x$1" != "x" ]; then
8 VPP_DIR=`dirname $0`/../../
11 if [ "x$2" != "x" ]; then
12 SUDOCMD="sudo -H -u $2"
17 echo VPP_DIR: $VPP_DIR
18 echo SUDOCMD: $SUDOCMD
20 # Figure out what system we are running on
21 if [ -f /etc/lsb-release ];then
23 elif [ -f /etc/redhat-release ];then
24 sudo yum install -y redhat-lsb
25 DISTRIB_ID=`lsb_release -si`
26 DISTRIB_RELEASE=`lsb_release -sr`
27 DISTRIB_CODENAME=`lsb_release -sc`
28 DISTRIB_DESCRIPTION=`lsb_release -sd`
30 echo DISTRIB_ID: $DISTRIB_ID
31 echo DISTRIB_RELEASE: $DISTRIB_RELEASE
32 echo DISTRIB_CODENAME: $DISTRIB_CODENAME
33 echo DISTRIB_DESCRIPTION: $DISTRIB_DESCRIPTION
35 # Install dependencies
37 make UNATTENDED=yes install-dep
39 # Really really clean things up so we can be sure
40 # that the build works even when switching distros
42 (cd build-root/;make distclean)
43 rm -f build-root/.bootstrap.ok
45 # Build and install packaging
46 $SUDOCMD make bootstrap
47 if [ $DISTRIB_ID == "Ubuntu" ]; then
49 elif [ $DISTRIB_ID == "CentOS" ]; then