Fix warning in darwin.sh when linking old libs

This commit is contained in:
Shivam Mathur 2021-04-19 00:36:09 +05:30
parent e2ad91ce1c
commit c470f034d0
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -236,6 +236,7 @@ link_libraries() {
formula_prefix="$(brew --prefix "$formula")" formula_prefix="$(brew --prefix "$formula")"
sudo mkdir -p "$formula_prefix"/lib sudo mkdir -p "$formula_prefix"/lib
for lib in "$formula_prefix"/lib/*.dylib; do for lib in "$formula_prefix"/lib/*.dylib; do
[ -f "$lib" ] || break
lib_name=$(basename "$lib") lib_name=$(basename "$lib")
sudo cp -a "$lib" "$brew_prefix/lib/old_$lib_name" 2>/dev/null || true sudo cp -a "$lib" "$brew_prefix/lib/old_$lib_name" 2>/dev/null || true
sudo ln -sf "$brew_prefix/lib/old_$lib_name" "$brew_prefix/lib/$lib_name" sudo ln -sf "$brew_prefix/lib/old_$lib_name" "$brew_prefix/lib/$lib_name"