forked from LLNL/conduit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap-env.sh
executable file
·46 lines (35 loc) · 1 KB
/
bootstrap-env.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
###############################################################################
# Copyright (c) Lawrence Livermore National Security, LLC and other Conduit
# Project developers. See top-level LICENSE AND COPYRIGHT files for dates and
# other details. No copyright assignment is required to contribute to Conduit.
#
# file: bootstrap-env.sh
#
#
# Takes you from zero to an env with TPLS needed to develop conduit on OSX
# and linux.
#
export ALL_ARGS="$@"
function info
{
echo "$@"
}
function uberenv
{
python scripts/uberenv/uberenv.py "$ALL_ARGS"
}
function main
{
uberenv
BOOSTRAP_CWD=`pwd`
SPACK_CMAKE_PREFIX=`ls -d $BOOSTRAP_CWD/uberenv_libs/spack/opt/spack/*/*/cmake*`
SPACK_CMAKE=`ls $SPACK_CMAKE_PREFIX/bin/cmake`
# Only add to PATH if `which cmake` isn't our CMake
CMAKE_CURRENT=`which cmake`
if [[ "$CMAKE_CURRENT" != "$SPACK_CMAKE" ]] ; then
export PATH=$SPACK_CMAKE_PREFIX/bin:$PATH
fi
info "[Active CMake:" `which cmake` "]"
}
main