#!/bin/sh
VPP_GIT_URL="$1"
if [ "x$1" = "x" ]; then
  VPP_GIT_URL="https://gerrit.fd.io/r/vpp"
fi
VPP_BRANCH="$2"
echo VPP URL: $VPP_GIT_URL
echo VPP branch: $VPP_BRANCH

sudo apt-get update && sudo apt-get -y install git build-essential &&  git clone $VPP_GIT_URL && (cd vpp && git checkout $VPP_BRANCH) && sudo apt-get install -y linux-headers-4.4.0-22-generic && sudo ln -s /lib/modules/4.4.0-22-generic /lib/modules/`uname -r` && cd vpp && UNATTENDED=y make install-dep bootstrap build


