diff options
author | Ed Warnicke <eaw@cisco.com> | 2016-09-13 20:04:28 +0000 |
---|---|---|
committer | Ed Warnicke <hagbard@gmail.com> | 2016-09-16 19:07:54 +0000 |
commit | 6e811b1125f1be24575270594ff2a46b8d62c3f0 (patch) | |
tree | 20b9c71e797b0fd7a261c63c88965c1b77a08db6 /nsh-plugin/build.sh | |
parent | 7e1fb32a85d72b147b9d3b2aa92223d782d166e3 (diff) |
nsh-plugin rpm packaging
Change-Id: I7acc688b3c40cbce34ada9be957b274c34780570
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-x | nsh-plugin/build.sh | 25 |
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} |