google / bazel-common

Common functionality for Google's open-source libraries that are built with bazel.
Apache License 2.0
87 stars 40 forks source link

MOE Sync 2020-05-12 #106

Closed kluever closed 4 years ago

kluever commented 4 years ago

This code has been reviewed and submitted internally. Feel free to discuss on the PR, and we can submit follow-up changes as necessary.

Commits:

Adjust usage of 'find' based on Mac or Linux host The find command in Mac is the BSD version while the one on Linux is GNU and they differ in capabilities, including the ability to find files with regex. On Mac and extra argument has to be passed, '-E' to interpret regular expressions with '-regex'. Meanwhile BSD regex interpretation also slightly differs from GNU, specifically it seems in the GNU version the parenthesis for a match group have to be escaped. This change updates the jarjar command to take the above into account, using 'uname' to check if host is Darwin. bfbdb70df5697a7d284293b106b7e2c57f41ed91