From 0268067cea1e35906972aacf0d039901c2789db7 Mon Sep 17 00:00:00 2001 From: Robert Neale Date: Wed, 1 Mar 2023 17:09:23 -0800 Subject: [PATCH] Force osname check to always be in lower-case. See #1077 PiperOrigin-RevId: 513382587 --- oss_scripts/run_build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/oss_scripts/run_build.sh b/oss_scripts/run_build.sh index b8f23280f..caeb331f9 100755 --- a/oss_scripts/run_build.sh +++ b/oss_scripts/run_build.sh @@ -2,8 +2,9 @@ set -e # fail and exit on any command erroring set -x # print evaluated commands -osname="$(uname -s)" -if [[ $osname == "Darwin" ]]; then +osname="$(uname -s | tr 'A-Z' 'a-z')" + +if [[ $osname == "darwin" ]]; then # Update to macos extensions sed -i '' 's/".so"/".dylib"/' tensorflow_text/tftext.bzl perl -pi -e "s/(load_library.load_op_library.*)\\.so'/\$1.dylib'/" $(find tensorflow_text/python -type f)