Skip to content

Commit

Permalink
Merge pull request #56 from rlcee/update_220210
Browse files Browse the repository at this point in the history
Update 220210
  • Loading branch information
rlcee authored Feb 10, 2022
2 parents b1c773a + f75f201 commit 95c9a9e
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions bin/museSetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,11 @@ fi
#
# cases allowed so far
# 1) an explicit qualifier like "-q p000"
# 2) Offline is local, pgit or a link, and has a .muse, use recommendation there
# 3) any other local package has a .muse with a recommendation
# 4) $MUSE_WORK_DIR/uNNN exists, take highest number there
# 5) use highest number from $MUSE_ENVSET_DIR
# 2) the MUSE_WORK_DIR has a .muse
# 3) Offline is local, pgit or a link, and has a .muse, use recommendation there
# 4) any other local package has a .muse with a recommendation
# 5) $MUSE_WORK_DIR/uNNN exists, take highest number there
# 6) use highest number from $MUSE_ENVSET_DIR
#

if [ -n "$MUSE_ENVSET" ]; then
Expand Down Expand Up @@ -316,6 +317,7 @@ if [ -z "$MUSE_ENVSET" ]; then
# put these in the front of the search list
[ -f link/Offline/.muse ] && DIRS="link/Offline $DIRS"
[ -f Offline/.muse ] && DIRS="Offline $DIRS"
[ -f ./.muse ] && DIRS=". $DIRS"

WARN=false
for DIR in $DIRS ; do
Expand All @@ -325,9 +327,11 @@ if [ -z "$MUSE_ENVSET" ]; then
if [[ -n "$WORD" && -z "$MUSE_ENVSET" ]]; then
# take the first in this loop
export MUSE_ENVSET=$WORD
if [ $MUSE_VERBOSE -gt 0 ]; then
if [ $MUSE_VERBOSE -gt 0 ]; then
DIRP="/$DIR" # print detail
[ "$DIR" == "." ] && DIRP=""
echo "INFO - using environment $MUSE_ENVSET from"
echo " \$MUSE_WORK_DIR/$DIR/.muse"
echo " \$MUSE_WORK_DIR${DIRP}/.muse"
fi
fi
[[ -n "$WORD" && -n "$MUSE_ENVSET" && "$WORD" != "$MUSE_ENVSET" ]] && WARN=true
Expand Down Expand Up @@ -537,8 +541,8 @@ do
export ROOT_INCLUDE_PATH=$( mdropit $ROOT_INCLUDE_PATH $MUSE_WORK_DIR/$PP )
fi

# add package generated fcl
# assuming only Offline generates fcl
# add package-generated fcl (trigger) and data (gdml) paths
# assuming only Offline generates these
if [ "$REPO" == "Offline" ]; then
TEMP=$MUSE_WORK_DIR/build/$MUSE_STUB
if [[ "$PP" =~ $linkReg ]]; then
Expand All @@ -547,8 +551,10 @@ do

if [ "$MUSE_NPATH" == "2" ]; then
export FHICL_FILE_PATH=$( mdropit $FHICL_FILE_PATH $TEMP/Offline )
export MU2E_SEARCH_PATH=$( mdropit $MU2E_SEARCH_PATH $TEMP/Offline )
fi
export FHICL_FILE_PATH=$( mdropit $FHICL_FILE_PATH $TEMP )
export FHICL_FILE_PATH=$( mdropit $FHICL_FILE_PATH $TEMP )
export MU2E_SEARCH_PATH=$( mdropit $MU2E_SEARCH_PATH $TEMP )
fi

# libraries built in each package
Expand Down

0 comments on commit 95c9a9e

Please sign in to comment.