blob: 67a2e4fb990beefe2534d47de18d74d75b526e95 [file] [log] [blame]
Tom Jonesc3b416c2024-01-18 14:51:44 +00001#!/usr/bin/env bash
Ed Warnickeefa7f9e2016-05-01 20:33:53 -05002
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
Kyle Mesteryacc1fbc2018-08-10 16:32:13 -050015 sudo -E yum install -y redhat-lsb
Ed Warnickeefa7f9e2016-05-01 20:33:53 -050016 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
Kyle Mesteryacc1fbc2018-08-10 16:32:13 -050027 (cd ${VPP_DIR}/build-root/;sudo -E dpkg -i *.deb)
Ed Warnickeefa7f9e2016-05-01 20:33:53 -050028elif [ $DISTRIB_ID == "CentOS" ]; then
Kyle Mesteryacc1fbc2018-08-10 16:32:13 -050029 (cd ${VPP_DIR}/build-root/;sudo -E rpm -Uvh *.rpm)
30fi