Эх сурвалжийг харах

Fix osx dependency check. otool prints the file name in the first line. Should skip it

Kun Zhang 10 жил өмнө
parent
commit
5c265faedb

+ 2 - 2
protoc-artifacts/build-protoc.sh

@@ -51,7 +51,7 @@ assertEq ()
 checkArch ()
 checkArch ()
 {
 {
   echo
   echo
-  echo "Checking for file format ..."
+  echo "Checking file format ..."
   if [[ "$OS" == windows || "$OS" == linux ]]; then
   if [[ "$OS" == windows || "$OS" == linux ]]; then
     format="$(objdump -f "$1" | grep -o "file format .*$" | grep -o "[^ ]*$")"
     format="$(objdump -f "$1" | grep -o "file format .*$" | grep -o "[^ ]*$")"
     echo Format=$format
     echo Format=$format
@@ -105,7 +105,7 @@ checkDependencies ()
       white_list="linux-vdso\.so\.1\|libpthread\.so\.0\|libm\.so\.6\|libc\.so\.6\|ld-linux-x86-64\.so\.2"
       white_list="linux-vdso\.so\.1\|libpthread\.so\.0\|libm\.so\.6\|libc\.so\.6\|ld-linux-x86-64\.so\.2"
     fi
     fi
   elif [[ "$OS" == osx ]]; then
   elif [[ "$OS" == osx ]]; then
-    dump_cmd='otool -L '"$1"
+    dump_cmd='otool -L '"$1"' | fgrep dylib'
     white_list="libz\.1\.dylib\|libc++\.1\.dylib\|libSystem\.B\.dylib"
     white_list="libz\.1\.dylib\|libc++\.1\.dylib\|libSystem\.B\.dylib"
   fi
   fi
   if [[ -z "$white_list" || -z "$dump_cmd" ]]; then
   if [[ -z "$white_list" || -z "$dump_cmd" ]]; then