blob: 2203db66d8f6a2a15fe41f968fc84d7d366c8aeb [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
Dave Wallace4f6c3a92017-10-24 15:39:44 -040015$SUDOCMD perl -pi -e 's/noinst_PROGRAMS/bin_PROGRAMS/g' $VPP_DIR/src/vcl.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