Skip to content
Snippets Groups Projects
Commit 59ca7cb0 authored by Thomas Juerges's avatar Thomas Juerges
Browse files

L2SS-218 Instead of deleting the tango dir, first move it out of the way

parent 4879b8f2
No related branches found
No related tags found
1 merge request!33Resolve L2SS-218 "Move existing tooling to bootstrap dir"
...@@ -7,6 +7,9 @@ if [ ! -d ${HOME_DIR}/bootstrap ]; then ...@@ -7,6 +7,9 @@ if [ ! -d ${HOME_DIR}/bootstrap ]; then
exit 1 exit 1
fi fi
# Save for the moment when tango will be cloned.
OLD_HOME_DIR=${HOME_DIR}.old
trap ' exit ${?} ' ABRT EXIT HUP INT TERM QUIT ERR trap ' exit ${?} ' ABRT EXIT HUP INT TERM QUIT ERR
...@@ -22,9 +25,9 @@ function build_lofar_images() ...@@ -22,9 +25,9 @@ function build_lofar_images()
popd popd
} }
function remove_tango_dir() function move_tango_dir_out_of_the_way()
{ {
rm -rf ${HOME_DIR} mv ${HOME_DIR} ${OLD_HOME_DIR}
} }
function remove_images() function remove_images()
...@@ -90,9 +93,10 @@ stop_images ...@@ -90,9 +93,10 @@ stop_images
# Clean out the Docker volumes. # Clean out the Docker volumes.
clean_images clean_images
# Delete the tango repo dir. Notice that this also deletes the bootstrap dir # Move the tango repo dir out of the way.
# which contains this and the helper scripts. echo "-> Moving the tango directory ${HOME_DIR} out of the way..."
remove_tango_dir move_tango_dir_out_of_the_way
echo -e "\tDone.\n"
# Therefore, since the tango/boostrap dir is now gone, pull the repo first # Therefore, since the tango/boostrap dir is now gone, pull the repo first
# and then continue. # and then continue.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment