Skip to content

Commit

Permalink
Merge pull request #9 from rlcee/210328
Browse files Browse the repository at this point in the history
move build links to setup
  • Loading branch information
rlcee authored Mar 29, 2021
2 parents c478582 + 4fbf51d commit 8b297f5
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 23 deletions.
17 changes: 0 additions & 17 deletions bin/museBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,6 @@ cd $MUSE_WORK_DIR

echo -n "$(date +'%D %H:%M:%S to ')" > $MUSE_BUILD_DIR/.musebuild

#
# "build" the linked packages by making sure the links
# from our build area to the backing build area are there
#
if [ -d link ]; then
# we should be in $MUSE_WORK_DIR
mkdir -p $MUSE_BUILD_BASE/link
for REPO in $( ls link )
do
BASE=$( readlink -f link/$REPO/.. )
if [ ! -d $MUSE_BUILD_BASE/link/$REPO ]; then
if [ -d $BASE/$MUSE_BUILD_BASE/$REPO ]; then
ln -s $BASE/$MUSE_BUILD_BASE/$REPO $MUSE_BUILD_BASE/link/$REPO
fi
fi
done
fi

#
# now run the local build
Expand Down
2 changes: 1 addition & 1 deletion bin/museInstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ EOL

cd ../..

tar -czf muse-${VERSION}.tgz muse/${VERSION} muse/${VERSION}.version
tar -cjf muse-${VERSION}.bz2 muse/${VERSION} muse/${VERSION}.version

cd $OWD
exit 0
Expand Down
7 changes: 5 additions & 2 deletions bin/museLink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ TARGET="$1"
# if no target, list cvmfs Offline
#

if [[ -z "$TARGET" || "$TARGET" == "-l"]]; then
if [[ -z "$TARGET" || "$TARGET" == "-l" ]]; then

echo "Recent published releases:"
# add PUB area when ready
Expand Down Expand Up @@ -104,9 +104,12 @@ fi
LINK=link/$(basename $FTARGET)
REPO=$( basename $LINK )

if [ -e "$LINK" ]; then
if [ -L "$LINK" ]; then
echo "WARNING - replacing a linked package of the same name: $REPO "
rm -f $LINK
# also remove any links to the build area
# will be recreated pointing to the new area in the next setup
rm -f build/*/link/$REPO
fi

ln -s $FTARGET $LINK
Expand Down
20 changes: 20 additions & 0 deletions bin/museSetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,26 @@ export MU2E_SEARCH_PATH=`dropit -p $MU2E_SEARCH_PATH -sfe $MUSE_WORK_DIR`
export FHICL_FILE_PATH=`dropit -p $FHICL_FILE_PATH -sfe $MUSE_WORK_DIR`
export ROOT_INCLUDE_PATH=`dropit -p $ROOT_INCLUDE_PATH -sfe $MUSE_WORK_DIR`

#
# "setup" the linked packages by making sure links exist
# from our build area to the linked build area
#
if [ -d link ]; then
mkdir -p $MUSE_BUILD_BASE/link
for REPO in $( ls link )
do
BASE=$( readlink -f link/$REPO/.. )
if [ ! -d $MUSE_BUILD_BASE/link/$REPO ]; then
if [ -d $BASE/$MUSE_BUILD_BASE/$REPO ]; then
ln -s $BASE/$MUSE_BUILD_BASE/$REPO $MUSE_BUILD_BASE/link/$REPO
else
echo "WARNING - linked repo $REPO does not have the $MUSE_STUB build"
fi
fi
done
fi


if [ $RC -ne 0 ]; then
echo "ERROR - setup did not run correctly"
return 1
Expand Down
7 changes: 4 additions & 3 deletions python/sconstruct_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ def sconscriptList(mu2eOpts):
def extraCleanup(mu2eOpts):
for top, dirs, files in os.walk(mu2eOpts['buildBase']):
for name in files:
ff = os.path.join(top, name)
print("removing file ", ff)
os.unlink (ff)
if name != ".musebuild":
ff = os.path.join(top, name)
print("removing file ", ff)
os.unlink (ff)

0 comments on commit 8b297f5

Please sign in to comment.