Skip to content

Commit

Permalink
Merge pull request #19 from JeffersonLab/two-part_gluex_install
Browse files Browse the repository at this point in the history
Do the install in two parts so that custom gluex_top can be set-up be…
  • Loading branch information
markito3 authored Oct 9, 2020
2 parents f9d76ff + 67ce037 commit 2659016
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 35 deletions.
20 changes: 20 additions & 0 deletions build_gluex.sh
Original file line number Diff line number Diff line change
@@ -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
33 changes: 33 additions & 0 deletions create_gluex_top.sh
Original file line number Diff line number Diff line change
@@ -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
38 changes: 3 additions & 35 deletions gluex_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2659016

Please sign in to comment.