aboutsummaryrefslogtreecommitdiffstats
path: root/nsh-plugin/build.sh
diff options
context:
space:
mode:
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}