Skip to content

Commit a7efcb7

Browse files
committed
build: delete package dir before redownloading it
1 parent 8baaffd commit a7efcb7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/compilation/download_packages.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ function extract_package() {
103103

104104
popd > /dev/null
105105

106+
# Make sure output dir is empty, so we could move content into it.
107+
# The directory might not exist, so we need to pass || true so that set -e won't fail us.
108+
rm -rf "$output_dir" || true
109+
106110
mv "$temp_dir/$package_dir" "$output_dir"
107111
if [[ $? -ne 0 ]]; then
108112
return 1

0 commit comments

Comments
 (0)