From eb0228713d931ff5b5a6d2111067aedde3b94ae2 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 16 Feb 2017 16:11:07 +0100 Subject: [PATCH] tools: only consider SOs that exist when finding symbols to export Also, set pipefail to catch the failures of all components of a pipeline. --- tools/create-exports-NetworkManager.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/create-exports-NetworkManager.sh b/tools/create-exports-NetworkManager.sh index c1010f7229..85c239302e 100755 --- a/tools/create-exports-NetworkManager.sh +++ b/tools/create-exports-NetworkManager.sh @@ -1,6 +1,7 @@ #!/bin/bash set -e +set -o pipefail die() { echo "$@" @@ -46,9 +47,9 @@ EOF } get_symbols_missing() { - (for f in ./src/settings/plugins/*/.libs/*.so \ - ./src/devices/*/.libs/*.so \ - ./src/ppp/.libs/libnm-ppp-plugin.so; do + (for f in $(find ./src/settings/plugins/*/.libs/ \ + ./src/devices/*/.libs/ \ + ./src/ppp/.libs/ -name '*.so'); do call_nm "$f" | sed -n 's/^\([U]\) \(\(nm_\|nmp_\|_nm\|NM\|_NM\).*\)$/\2/p' done) |