blob: 3be185170d9dd31f4b63623e89ce9c5a8d30a373 [file] [log] [blame]
Dave Wallace3079a642017-09-06 01:59:43 -04001#!/bin/bash
2
Dave Wallace19481612017-09-15 18:47:44 -04003if [ -n "$1" ]; then
Dave Wallace3079a642017-09-06 01:59:43 -04004 VPP_DIR=$1
5else
6 VPP_DIR=`dirname $0`/../../
7fi
8
Dave Wallace19481612017-09-15 18:47:44 -04009if [ -n "$2" ]; then
Dave Wallace3079a642017-09-06 01:59:43 -040010 SUDOCMD="sudo -H -u $2"
11fi
12
13echo 'Building VCL test apps'
14cd $VPP_DIR
15$SUDOCMD perl -pi -e 's/noinst_PROGRAMS/bin_PROGRAMS/g' $VPP_DIR/src/uri.am
Dave Wallace19481612017-09-15 18:47:44 -040016$SUDOCMD make dpdk-install-dev build-release
17sudo sysctl -p$VPP_DIR/src/vpp/conf/80-vpp.conf
Dave Wallace3079a642017-09-06 01:59:43 -040018sudo modprobe uio_pci_generic
Dave Wallace19481612017-09-15 18:47:44 -040019
20if [ "$2" = "vagrant" ] && [ -d "/home/vagrant" ] ; then
21 dot_bash_aliases="/home/$2/.bash_aliases"
22 echo "export WS_ROOT=$VPP_DIR" | $SUDOCMD tee $dot_bash_aliases
23 source $dot_bash_aliases
24fi
25