Debian Codegraph @

packages/stk/stk_integration_tests/cmake_install_test/create_workspace.sh

raw
1 #!/bin/bash
2
3 exe() {
4 stdbuf -o0 -e0 echo "% $@" ;
5 eval "$@" ;
6 if [ $? -ne 0 ] ; then
7 echo "'$@' failed.";
8 exit 1;
9 fi
10 }
11
12 trilinos_dir=${1:?"Must pass directory to clone Trilinos into!"}
13 sierra_proj=${2:?"Must pass path to sierra!"}
14
15 if [ ! -d ${trilinos_dir} ] ; then
16 exe git clone -b develop https://github.com/trilinos/Trilinos.git ${trilinos_dir}
17 else
18 exe cd "${trilinos_dir}"
19 exe git checkout develop
20 exe git reset --hard origin/develop
21 exe git pull
22 fi
23
24 if [ -d ${trilinos_dir}/packages/stk ] ; then
25 exe rm -rf ${trilinos_dir}/packages/stk;
26 fi
27 if [ ! -L ${trilinos_dir}/packages/stk ] ; then
28 exe ln -s ${sierra_proj}/stk ${trilinos_dir}/packages
29 fi
30
31 # we do not want to pay attention to the Trilinos configuration
32 rm -rf ${trilinos_dir}/CTestConfig.cmake