summaryrefslogtreecommitdiffstats
path: root/env.bash
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2015-04-27 15:02:25 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-09-01 16:18:32 -0500
commit4ae690e4eeb9297ed59ff932cc4184d23896234d (patch)
treeb3205f1b84aff7dbad3f949c78fe6e4c08067368 /env.bash
parent0795cc6781a4d937786b39c23b655397432ec90e (diff)
downloadtalos-hostboot-4ae690e4eeb9297ed59ff932cc4184d23896234d.tar.gz
talos-hostboot-4ae690e4eeb9297ed59ff932cc4184d23896234d.zip
Generalize env vars, env setup, and copyright scripts
Methods ported over from code in EKB. Change-Id: I26b6f2326314936b0316f64272230730ecd3f9ee RTC: 126634 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17465 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'env.bash')
-rwxr-xr-xenv.bash30
1 files changed, 25 insertions, 5 deletions
diff --git a/env.bash b/env.bash
index 1687d8c82..c5a29af25 100755
--- a/env.bash
+++ b/env.bash
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2010,2014
+# Contributors Listed Below - COPYRIGHT 2010,2015
# [+] International Business Machines Corp.
#
#
@@ -38,11 +38,17 @@ else
export PATH=${FAKEROOT}/wrappers:${PATH}
fi
-export PATH=${PATH}:`pwd`/src/build/trace
-export PATH=${PATH}:`pwd`/src/build/tools
+# Setup some global variables
+export PROJECT_NAME=HostBoot
+export PROJECT_ROOT=$PWD
+export TOOLSDIR=$PROJECT_ROOT/src/build/tools
+export HOOKSDIR=$PROJECT_ROOT/.git/hooks
+# Copyright license file for project
+export LICENSE=$PROJECT_ROOT/LICENSE_PROLOG
-export HOSTBOOTROOT=`pwd`
-TOOLSDIR=$HOSTBOOTROOT/src/build/tools
+# Update PATH
+export PATH=${PATH}:$PWD/src/build/trace
+export PATH=${PATH}:$TOOLSDIR
if [ -n "${SANDBOXROOT}" ]; then
if [ -n "${SANDBOXNAME}" ]; then
@@ -52,6 +58,20 @@ fi
export DEFAULT_MACHINE=MURANO
+## Search and set gerrit host
+# Gerrit host name should be in .ssh/config file
+# Example:
+# Host gerrit-server
+# Hostname gfw160.aus.stglabs.ibm.com
+# Port 29418
+# AFSTokenPassing no
+if [ -e $HOME/.ssh/config ]; then
+if [ -e $TOOLSDIR/gerrit-hostname ]; then
+ echo "Searching for Gerrit Host..."
+ eval $($TOOLSDIR/gerrit-hostname)
+fi
+fi
+
## run setupgithooks.pl
if [ -e .git/hooks ]; then
if [ -e $TOOLSDIR/setupgithooks.sh ]; then
OpenPOWER on IntegriCloud