2024-01-18 14:51:44 +00:00
|
|
|
#!/usr/bin/env bash
|
2017-09-06 01:59:43 -04:00
|
|
|
|
2017-09-15 18:47:44 -04:00
|
|
|
if [ -n "$1" ]; then
|
2017-09-06 01:59:43 -04:00
|
|
|
VPP_DIR=$1
|
|
|
|
else
|
|
|
|
VPP_DIR=`dirname $0`/../../
|
|
|
|
fi
|
|
|
|
|
2017-09-15 18:47:44 -04:00
|
|
|
if [ -n "$2" ]; then
|
2017-09-06 01:59:43 -04:00
|
|
|
SUDOCMD="sudo -H -u $2"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo 'Building VCL test apps'
|
|
|
|
cd $VPP_DIR
|
2017-10-24 15:39:44 -04:00
|
|
|
$SUDOCMD perl -pi -e 's/noinst_PROGRAMS/bin_PROGRAMS/g' $VPP_DIR/src/vcl.am
|
2018-09-18 18:41:38 +02:00
|
|
|
$SUDOCMD make install-ext-deps build-release
|
2017-09-15 18:47:44 -04:00
|
|
|
sudo sysctl -p$VPP_DIR/src/vpp/conf/80-vpp.conf
|
2017-09-06 01:59:43 -04:00
|
|
|
sudo modprobe uio_pci_generic
|
2017-09-15 18:47:44 -04:00
|
|
|
|
|
|
|
if [ "$2" = "vagrant" ] && [ -d "/home/vagrant" ] ; then
|
|
|
|
dot_bash_aliases="/home/$2/.bash_aliases"
|
|
|
|
echo "export WS_ROOT=$VPP_DIR" | $SUDOCMD tee $dot_bash_aliases
|
|
|
|
source $dot_bash_aliases
|
|
|
|
fi
|
|
|
|
|