verify.sh revision 237944f3
1#!/bin/bash
2set -xe -o pipefail
3# Figure out what system we are running on
4if [ -f /etc/lsb-release ];then
5    . /etc/lsb-release
6elif [ -f /etc/redhat-release ];then
7    sudo yum install -y redhat-lsb
8    DISTRIB_ID=`lsb_release -si`
9    DISTRIB_RELEASE=`lsb_release -sr`
10    DISTRIB_CODENAME=`lsb_release -sc`
11    DISTRIB_DESCRIPTION=`lsb_release -sd`
12fi
13echo DISTRIB_ID: $DISTRIB_ID
14echo DISTRIB_RELEASE: $DISTRIB_RELEASE
15echo DISTRIB_CODENAME: $DISTRIB_CODENAME
16echo DISTRIB_DESCRIPTION: $DISTRIB_DESCRIPTION
17
18NSH_PLUGIN_DIR=$(dirname $0)/../../nsh-plugin/
19NSH_PLUGIN_DIR=$(readlink -f $NSH_PLUGIN_DIR)
20echo "NSH_PLUGIN_DIR: ${NSH_PLUGIN_DIR}"
21export NSH_INSTALL_PREFIX=${NSH_PLUGIN_DIR}/_install
22export SUDOCMD=""
23if test -f /usr/bin/lsb_release  && test `lsb_release -si` == "Ubuntu"  && test `lsb_release -sr` == "14.04"  && test -d /usr/lib/jvm/java-8-openjdk-amd64/ ; then
24    export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
25    export JAVAC=${JAVA_HOME}/bin/javac
26    export PATH=${JAVA_HOME}/bin/:${PATH}
27    break
28fi
29${NSH_PLUGIN_DIR}/build.sh
30
31
32