aboutsummaryrefslogtreecommitdiffstats
path: root/nsh-plugin/build.sh
diff options
context:
space:
mode:
authorEd Warnicke <eaw@cisco.com>2016-09-13 20:04:28 +0000
committerEd Warnicke <eaw@cisco.com>2016-10-04 11:26:31 -0700
commit24bb3c191a66d20624d550f9ea392f2873199e88 (patch)
tree7a5798ca9aaa8eb938ba4156c780ad711deb72d8 /nsh-plugin/build.sh
parentde3e03905b12cffd3f4b9824c4175581b313158e (diff)
nsh-plugin rpm packaging
Change-Id: I5ccacfa9e09c88f84ac5b5cb303ba4d170f3743d Signed-off-by: Ed Warnicke <eaw@cisco.com> Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Diffstat (limited to 'nsh-plugin/build.sh')
-rwxr-xr-xnsh-plugin/build.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/nsh-plugin/build.sh b/nsh-plugin/build.sh
index 86d592b..2acc331 100755
--- a/nsh-plugin/build.sh
+++ b/nsh-plugin/build.sh
@@ -1,4 +1,29 @@
#!/usr/bin/env bash
+
+# Figure out what system we are running on
+if [ -f /etc/lsb-release ];then
+ . /etc/lsb-release
+elif [ -f /etc/redhat-release ];then
+ sudo yum install -y redhat-lsb
+ DISTRIB_ID=`lsb_release -si`
+ DISTRIB_RELEASE=`lsb_release -sr`
+ DISTRIB_CODENAME=`lsb_release -sc`
+ DISTRIB_DESCRIPTION=`lsb_release -sd`
+fi
+KERNEL_OS=`uname -o`
+KERNEL_MACHINE=`uname -m`
+KERNEL_RELEASE=`uname -r`
+KERNEL_VERSION=`uname -v`
+
+echo KERNEL_OS: $KERNEL_OS
+echo KERNEL_MACHINE: $KERNEL_MACHINE
+echo KERNEL_RELEASE: $KERNEL_RELEASE
+echo KERNEL_VERSION: $KERNEL_VERSION
+echo DISTRIB_ID: $DISTRIB_ID
+echo DISTRIB_RELEASE: $DISTRIB_RELEASE
+echo DISTRIB_CODENAME: $DISTRIB_CODENAME
+echo DISTRIB_DESCRIPTION: $DISTRIB_DESCRIPTION
+
NSH_PLUGIN_DIR=$(dirname $0)
NSH_INSTALL_PREFIX=${NSH_INSTALL_PREFIX:-/usr}
cd ${NSH_PLUGIN_DIR}