Skip to content

Commit

Permalink
Merge pull request #10 from rlcee/210330
Browse files Browse the repository at this point in the history
move local envset and linkOrder to muse subdir
  • Loading branch information
rlcee authored Mar 31, 2021
2 parents 8b297f5 + 6a51b98 commit b7e509c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
12 changes: 6 additions & 6 deletions bin/museSetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ if [ -z "$MUSE_ENVSET" ]; then

# take the latest from the env sets in the user area

WORD=$( find $MUSE_WORK_DIR -maxdepth 1 -type f -regex ".*u[0-9]..$" -printf "%f\n" | sort | tail -1 )
WORD=$( find $MUSE_WORK_DIR/muse -maxdepth 1 -type f -regex ".*u[0-9]..$" -printf "%f\n" | sort | tail -1 )
if [ -n "$WORD" ]; then
export MUSE_ENVSET=$WORD
if [ $MUSE_VERBOSE -gt 0 ]; then
Expand Down Expand Up @@ -251,8 +251,8 @@ if [ $MUSE_VERBOSE -gt 0 ]; then
fi


if [ -r $MUSE_WORK_DIR/$MUSE_ENVSET ]; then
source $MUSE_WORK_DIR/$MUSE_ENVSET
if [ -r $MUSE_WORK_DIR/muse/$MUSE_ENVSET ]; then
source $MUSE_WORK_DIR/muse/$MUSE_ENVSET
RC=$?
elif [ -r $MUSE_ENVSET_DIR/$MUSE_ENVSET ]; then
source $MUSE_ENVSET_DIR/$MUSE_ENVSET
Expand Down Expand Up @@ -299,8 +299,8 @@ export MU2E_SEARCH_PATH=$MU2E_DATA_PATH

# define link order
# use the local one if it exists
if [ -f $MUSE_WORK_DIR/linkOrder ]; then
TEMP=$MUSE_WORK_DIR/linkOrder
if [ -f $MUSE_WORK_DIR/muse/linkOrder ]; then
TEMP=$MUSE_WORK_DIR/muse/linkOrder
else
TEMP=$MUSE_ENVSET_DIR/linkOrder
fi
Expand All @@ -319,7 +319,7 @@ linkReg="^link/*"

#
# the next 35 lines of code orders the repos according
# 1) ABC before link/ABC (Offline takes link precendence over link/Offline)
# 1) ABC before link/ABC (Offline takes link precedence over link/Offline)
# 2) the linkOrder
# 3) if the repo is not in the linkOrder, put it first
#
Expand Down
18 changes: 13 additions & 5 deletions bin/museStatus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,41 @@ fi

[ -n "$MUSE_WORK_DIR" ] && cd $MUSE_WORK_DIR

FOUND=false
if [ -d build ]; then
echo ""
echo " existing builds:"
DIRS=$(ls -1 build)
for DIR in $DIRS; do
if [ "$DIR" == "$MUSE_STUB" ]; then
echo " $DIR ** this is your current setup **"
FOUND=true
else
echo " $DIR"
fi

echo -n " Build times: "
if [ -e build/$DIR/.musebuild ]; then
echo "$(cat build/$DIR/.musebuild)"
cat build/$DIR/.musebuild
else
echo " N/A"
fi
done
echo ""
else
echo ""
echo " no existing builds"
echo ""
fi

if [[ -n "$MUSE_STUB" && "$FOUND" == "false" ]]; then
echo " pesumptive build:"
echo " $MUSE_STUB ** this is your current setup **"
fi
echo ""


[ -z "$MUSE_WORK_DIR" ] && exit 0


[ $MUSE_VERBOSE -gt 0 ] && echo "directory containing repos to be built:"
echo " MUSE_WORK_DIR = $MUSE_WORK_DIR "
[ $MUSE_VERBOSE -gt 0 ] && echo "space-separated list of local repos to build:"
Expand All @@ -71,10 +79,10 @@ echo " MUSE_VERBOSE = " $MUSE_VERBOSE
echo " MUSE_OPTS = " $MUSE_OPTS
[ $MUSE_VERBOSE -gt 0 ] && echo "envset determines the UPS products to use:"
echo " MUSE_ENVSET = " $MUSE_ENVSET
[ $MUSE_VERBOSE -gt 0 ] && echo "path to find sets of environmental setups:"
echo " MUSE_ENVSET_DIR = " $MUSE_ENVSET_DIR
[ $MUSE_VERBOSE -gt 0 ] && echo "build directory stub based on the build options:"
echo " MUSE_STUB = " $MUSE_STUB
[ $MUSE_VERBOSE -gt 0 ] && echo "path to find sets of environmental setups:"
echo " MUSE_ENVSET_DIR = " $MUSE_ENVSET_DIR
#[ $MUSE_VERBOSE -gt 0 ] && echo "the relative path to the build directory:"
#echo " MUSE_BUILD_BASE = " $MUSE_BUILD_BASE
#[ $MUSE_VERBOSE -gt 0 ] && echo "full path to build dir:"
Expand Down

0 comments on commit b7e509c

Please sign in to comment.