From 991b56c7392a16c069f5b707e65814f17bc738be Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 9 Dec 2022 21:10:58 +0100 Subject: [PATCH] generate-emscripten-symbols.sh: allows the lib path to be overridden --- dist-build/generate-emscripten-symbols.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dist-build/generate-emscripten-symbols.sh b/dist-build/generate-emscripten-symbols.sh index 873307d2..d5b259bd 100755 --- a/dist-build/generate-emscripten-symbols.sh +++ b/dist-build/generate-emscripten-symbols.sh @@ -2,6 +2,8 @@ set -e +LIBSODIUM=${LIBSODIUM:-/tmp/sodium/lib/libsodium.27.dylib} + symbols() { { SUMO="$1" @@ -17,9 +19,9 @@ symbols() { fi done < emscripten-symbols.def - /usr/bin/nm /usr/local/lib/libsodium.23.dylib | \ - fgrep ' T _' | \ - cut -d' ' -f3 | { + /usr/bin/nm "$LIBSODIUM" | + fgrep ' T _' | + cut -d' ' -f3 | { while read symbol; do eval "found=\$defined_${symbol}" if [ "$found" = "yes" ]; then