From b9a70a278a1042c4a8cf39963bd7d9d7e52d7a22 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Fri, 12 Apr 2019 23:50:36 +0100 Subject: [PATCH] build: Unwind symlinks before upload --- build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build b/build index 8e7876c..0df2beb 100755 --- a/build +++ b/build @@ -314,7 +314,15 @@ task_deploy() { subtask_begin "Unpacking release files"; execute tar -hxf "${ARCHIVE}/Air-Quality-Web.tar.gz" -C "${temp_dir}"; subtask_end $? "Failed to unpack release files"; + + subtask_begin "Removing data directory"; rm -r "${temp_dir}/data"; # Delete the default data directory - there's one on the server already + subtask_end $?; + + subtask_begin "Unwinding symlinks"; + find -type l -exec bash -c 'ln -f "$(readlink -m "$0")" "$0"' {} \; + subtask_end $?; + # Define the directory whose contents we want to upload source_upload_dir="${temp_dir}/";