From dbd7d9c84d1e024bf5aaf2fafbe808b89ce332a0 Mon Sep 17 00:00:00 2001 From: Kasper Dissing Bargsteen Date: Mon, 17 Apr 2023 09:55:50 +0200 Subject: [PATCH] Document why create-dir should be used over overwrite-dir --- scripts/distribution/macOS-package/build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/distribution/macOS-package/build.sh b/scripts/distribution/macOS-package/build.sh index ea1e1cc3ea..9ad0aee5de 100755 --- a/scripts/distribution/macOS-package/build.sh +++ b/scripts/distribution/macOS-package/build.sh @@ -248,6 +248,10 @@ function collectDylibs() { local fileToFix=${1:?"Missing file to fix with dylibbundler"}; cd "$payloadDir/Library/Concordium Node" # Paths to search for dylibs are added with the '-s' flag. + # We use `--create-dir` to ensure that the `./libs` folder exists. + # But we should not use `--overwrite-dir` even though it implies `--create-dir` + # because it will delete the libs folder if it already exists, which would delete + # the results of previous calls to `collectDylibsFor`. "$macdylibbundlerDir/dylibbundler" --fix-file "$fileToFix" --bundle-deps --dest-dir "./libs" --install-path "@executable_path/libs/" --create-dir \ -s "$concordiumDylibDir" \ -s "$stackSnapshotDir" \