Skip to content

Commit bbfb973

Browse files
authored
Do not use GNU find features on FreeBSD (#345)
FreeBSD (like MacOS) does not support the `-executable` argument for `find`. This commit checks if the OS is FreeBSD, and if so, uses the same workaround as already in place on MacOS.
1 parent 19fb80b commit bbfb973

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

strip_symbols.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
set -e
33

44
DIRECTORY=${1:-/opt/wasi-sdk/bin}
5-
if [[ "$OSTYPE" == "darwin"* ]]; then
6-
# macos find doesnt support -executable so we fall back on having a permission
7-
# bit to execute:
5+
if [[ "$OSTYPE" == "darwin"* ]] || [[ "$OSTYPE" == "freebsd"* ]]; then
6+
# macos and freebsd find do not support -executable so we fall back on
7+
# having a permission bit to execute:
88
EXECUTABLES=$(find ${DIRECTORY} -type f -perm +111)
99
else
1010
EXECUTABLES=$(find ${DIRECTORY} -type f -executable)

0 commit comments

Comments
 (0)