session: fix local session tagging and cleanup
[vpp.git] / extras / vagrant / install.sh
1 #!/bin/bash
2
3 # Get Command Line arguements if present
4 VPP_DIR=$1
5 if [ "x$1" != "x" ]; then
6     VPP_DIR=$1
7 else
8     VPP_DIR=`dirname $0`/../../
9 fi
10
11 # Figure out what system we are running on
12 if [ -f /etc/lsb-release ];then
13     . /etc/lsb-release
14 elif [ -f /etc/redhat-release ];then
15     sudo -E yum install -y redhat-lsb
16     DISTRIB_ID=`lsb_release -si`
17     DISTRIB_RELEASE=`lsb_release -sr`
18     DISTRIB_CODENAME=`lsb_release -sc`
19     DISTRIB_DESCRIPTION=`lsb_release -sd`
20 fi
21 echo DISTRIB_ID: $DISTRIB_ID
22 echo DISTRIB_RELEASE: $DISTRIB_RELEASE
23 echo DISTRIB_CODENAME: $DISTRIB_CODENAME
24 echo DISTRIB_DESCRIPTION: $DISTRIB_DESCRIPTION
25
26 if [ $DISTRIB_ID == "Ubuntu" ]; then
27     (cd ${VPP_DIR}/build-root/;sudo -E dpkg -i *.deb)
28 elif [ $DISTRIB_ID == "CentOS" ]; then
29     (cd ${VPP_DIR}/build-root/;sudo -E rpm -Uvh *.rpm)
30 fi