build.sh revision 555bf309
1#!/bin/bash
2
3# Get Command Line arguements if present
4SRC_DIR=$1
5if [ "x$1" != "x" ]; then
6    SRC_DIR=$1
7else
8    SRC_DIR=`dirname $0`/../../
9fi
10
11if [ "x$2" != "x" ]; then
12    SUDOCMD="sudo -H -u $2"
13fi
14echo 0:$0
15echo 1:$1
16echo 2:$2
17echo SRC_DIR: $SRC_DIR
18echo SUDOCMD: $SUDOCMD
19
20# Figure out what system we are running on
21if [ -f /etc/lsb-release ];then
22    . /etc/lsb-release
23elif [ -f /etc/redhat-release ];then
24    sudo yum install -y redhat-lsb
25    DISTRIB_ID=`lsb_release -si`
26    DISTRIB_RELEASE=`lsb_release -sr`
27    DISTRIB_CODENAME=`lsb_release -sc`
28    DISTRIB_DESCRIPTION=`lsb_release -sd`
29fi
30echo DISTRIB_ID: $DISTRIB_ID
31echo DISTRIB_RELEASE: $DISTRIB_RELEASE
32echo DISTRIB_CODENAME: $DISTRIB_CODENAME
33echo DISTRIB_DESCRIPTION: $DISTRIB_DESCRIPTION
34
35
36
37