From 67ce037f9fc44f10b0ea8f6ac63b00ec771604f0 Mon Sep 17 00:00:00 2001 From: Mark Ito Date: Fri, 9 Oct 2020 15:23:09 -0400 Subject: [PATCH] Do the install in two parts so that custom gluex_top can be set-up between the parts. --- build_gluex.sh | 20 ++++++++++++++++++++ create_gluex_top.sh | 33 +++++++++++++++++++++++++++++++++ gluex_install.sh | 38 +++----------------------------------- 3 files changed, 56 insertions(+), 35 deletions(-) create mode 100755 build_gluex.sh create mode 100755 create_gluex_top.sh diff --git a/build_gluex.sh b/build_gluex.sh new file mode 100755 index 0000000..a83ca43 --- /dev/null +++ b/build_gluex.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# GI_PATH is the fully qualified directory that contains this script +gi_script="${BASH_SOURCE[0]}"; +if([ -h "${gi_script}" ]) then + while([ -h "${gi_script}" ]) do gi_script=`readlink "${gi_script}"`; done +fi +pushd . > /dev/null +cd `dirname ${gi_script}` > /dev/null +GI_PATH=`pwd` +popd > /dev/null +source gluex_env_boot.sh +gxenv +make -f $BUILD_SCRIPTS/Makefile_all gluex_pass1 +if [ $? -ne 0 ] +then + echo pass 1 failed, exiting + exit 1 +fi +gxenv +make -f $BUILD_SCRIPTS/Makefile_all gluex_pass2 diff --git a/create_gluex_top.sh b/create_gluex_top.sh new file mode 100755 index 0000000..3916ae4 --- /dev/null +++ b/create_gluex_top.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# GI_PATH is the fully qualified directory that contains this script +gi_script="${BASH_SOURCE[0]}"; +if([ -h "${gi_script}" ]) then + while([ -h "${gi_script}" ]) do gi_script=`readlink "${gi_script}"`; done +fi +pushd . > /dev/null +cd `dirname ${gi_script}` > /dev/null +GI_PATH=`pwd` +popd > /dev/null +# +mkdir -p gluex_top +pushd gluex_top +pwd_string=`pwd` +mkdir -p resources +if [ -e build_scripts ] + then + echo build_scripts already here, skip installation +else + echo cloning build_scripts repository + git clone https://github.com/jeffersonlab/build_scripts + pushd build_scripts + ./update_to_latest.sh + popd +fi +if [ -e halld_versions ] + then + echo halld_versions already here, skip installation +else + echo cloning halld_versions repository + git clone https://github.com/jeffersonlab/halld_versions +fi +$GI_PATH/create_setup_scripts.sh $pwd_string diff --git a/gluex_install.sh b/gluex_install.sh index 00ad121..56e2021 100755 --- a/gluex_install.sh +++ b/gluex_install.sh @@ -8,38 +8,6 @@ pushd . > /dev/null cd `dirname ${gi_script}` > /dev/null GI_PATH=`pwd` popd > /dev/null -# -mkdir -p gluex_top -pushd gluex_top -pwd_string=`pwd` -mkdir -p resources -if [ -e build_scripts ] - then - echo build_scripts already here, skip installation -else - echo cloning build_scripts repository - git clone https://github.com/jeffersonlab/build_scripts - pushd build_scripts - ./update_to_latest.sh - popd -fi -if [ -e halld_versions ] - then - echo halld_versions already here, skip installation -else - echo cloning halld_versions repository - git clone https://github.com/jeffersonlab/halld_versions -fi -$GI_PATH/create_setup_scripts.sh $pwd_string -source gluex_env_local.sh -make -f $BUILD_SCRIPTS/Makefile_all gluex_pass1 -if [ $? -ne 0 ] -then - echo pass 1 failed, exiting - popd - exit 1 -fi -source $BUILD_SCRIPTS/gluex_env_clean.sh -source gluex_env_local.sh -make -f $BUILD_SCRIPTS/Makefile_all gluex_pass2 -popd +$GI_PATH/create_gluex_top.sh +cd gluex_top +$GI_PATH/build_gluex.sh