blob: a53faa4dd73165cd32f895c07be60c7429eea222 [file] [log] [blame]
Ed Warnickeefa7f9e2016-05-01 20:33:53 -05001#!/bin/bash
2
3# Get Command Line arguements if present
4VPP_DIR=$1
5if [ "x$1" != "x" ]; then
6 VPP_DIR=$1
7else
8 VPP_DIR=`dirname $0`/../../
9fi
10
11# Figure out what system we are running on
12if [ -f /etc/lsb-release ];then
13 . /etc/lsb-release
14elif [ -f /etc/redhat-release ];then
15 sudo 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`
20fi
21echo DISTRIB_ID: $DISTRIB_ID
22echo DISTRIB_RELEASE: $DISTRIB_RELEASE
23echo DISTRIB_CODENAME: $DISTRIB_CODENAME
24echo DISTRIB_DESCRIPTION: $DISTRIB_DESCRIPTION
25
26if [ $DISTRIB_ID == "Ubuntu" ]; then
27 (cd ${VPP_DIR}/build-root/;sudo dpkg -i *.deb)
28elif [ $DISTRIB_ID == "CentOS" ]; then
29 (cd ${VPP_DIR}/build-root/;sudo rpm -Uvh *.rpm)
30fi