Commit 6d09fafd authored by Ophélie Gagnard's avatar Ophélie Gagnard

build-scripts/*bootstrap_buildout.sh: Improve the backup mechanism of the...

build-scripts/*bootstrap_buildout.sh: Improve the backup mechanism of the tarball directory taking into account the Go modules handling.
parent 81bb3134
......@@ -24,7 +24,21 @@ cp $COMPILATION_TEMPLATES_DIR/tmp/$SOFTWARE_NAME/local_buildout.cfg buildout.cfg
#cp $COMPILATION_TEMPLATES_DIR/tmp/buildout_with_gcc.cfg buildout.cfg
cd $INITIAL_DIR
# the following should simply add "backup." before the directory name pointed to by $TARBALL_DIR
# Fix the go/ directory.
# For some reason the user does not have the "write" permission on some directories of go/. As it is
# needed on a directory to delete a file in it, the if block adds the permissions to every
# directories in go/.
# This is performed before copying the directory tree elsewhere so that every copy is fixed.
# It also allows the cleaning script to delete the result of the current script.
if [ -d $RUN_BUILDOUT_DIR/go ]; then
find $RUN_BUILDOUT_DIR/go -name "*" -type d -exec chmod u+xw {} +
fi
cd $INITIAL_DIR
# Backup $TARBALL_DIR for debugging or other purpose
# add "backup." before the directory name pointed to by $TARBALL_DIR
BACKUP_DIR=$TARBALL_DIR/../backup.$SOFTWARE_AND_VERSION
BACKUP_DIR=`realpath -m $BACKUP_DIR`
# Delete the potential old backup and backup the newly created build tree instead.
......
......@@ -4,9 +4,10 @@ set -e
source build-scripts/configuration_information.sh
cd $INITIAL_DIR
# Remove the bootstrap script and associated files
# Remove the products of the script bootstrap_buildout.sh
# remove the bootstrap script and associated files
rm -f $RUN_BUILDOUT_DIR/{bootstrap.py,bootstrap-buildout.py,buildout.cfg}
cd $INITIAL_DIR
# Clean the material created by the bootstrap script
# remove the material created by the bootstrap script
rm -rf $RUN_BUILDOUT_DIR/{bin/,egg/}
# remove the material created by buildout itself
rm -rf $RUN_BUILDOUT_DIR/go/
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment