Fix bash in osx_cc_wrapper RELNOTES: None. PiperOrigin-RevId: 178745230
diff --git a/tools/cpp/osx_cc_wrapper.sh b/tools/cpp/osx_cc_wrapper.sh index 9438567..800bc05 100755 --- a/tools/cpp/osx_cc_wrapper.sh +++ b/tools/cpp/osx_cc_wrapper.sh
@@ -84,6 +84,7 @@ # Do replacements in the output for rpath in ${RPATHS}; do for lib in ${LIBS}; do + unset libname if [ -f "$(dirname ${OUTPUT})/${rpath}/lib${lib}.so" ]; then libname="lib${lib}.so" elif [ -f "$(dirname ${OUTPUT})/${rpath}/lib${lib}.dylib" ]; then
diff --git a/tools/cpp/osx_cc_wrapper.sh.tpl b/tools/cpp/osx_cc_wrapper.sh.tpl index 713c711..2df827a 100644 --- a/tools/cpp/osx_cc_wrapper.sh.tpl +++ b/tools/cpp/osx_cc_wrapper.sh.tpl
@@ -86,6 +86,7 @@ # Do replacements in the output for rpath in ${RPATHS}; do for lib in ${LIBS}; do + unset libname if [ -f "$(dirname ${OUTPUT})/${rpath}/lib${lib}.so" ]; then libname="lib${lib}.so" elif [ -f "$(dirname ${OUTPUT})/${rpath}/lib${lib}.dylib" ]; then