Ensure we run inside a sane folder when switching the codes

This commit is contained in:
Johannes Zellner
2016-12-12 12:43:37 +01:00
parent 17c2aa4faf
commit c1700069dc

View File

@@ -83,6 +83,9 @@ if [[ "${is_update}" == "yes" ]]; then
${BOX_SRC_DIR}/setup/stop.sh # stop the old code
fi
# ensure we are not inside the source directory, which we will remove now
cd /root
# switch the codes
rm -rf "${BOX_SRC_DIR}"
mv "${box_src_tmp_dir}" "${BOX_SRC_DIR}"