mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 13:30:20 +01:00
build: fix "create-exports-NetworkManager.sh" to fail if "nm" fails
Despite `set -e`, the shell script does not fail if the command in the here document fails. This can happen if binutils' "nm" fails. NM=/bin/false "./tools/create-exports-NetworkManager.sh" --called-from-build "."
This commit is contained in:
parent
1ace723d38
commit
7fe76f54e3
1 changed files with 7 additions and 4 deletions
|
|
@ -46,7 +46,7 @@ get_symbols_nm () {
|
|||
_sort
|
||||
}
|
||||
|
||||
get_symbols_explict() {
|
||||
get_symbols_explicit() {
|
||||
cat <<EOF | _sort
|
||||
_IO_stdin_used
|
||||
EOF
|
||||
|
|
@ -60,7 +60,7 @@ get_symbols_missing() {
|
|||
sed -n 's/^\([U]\) \(\(nm_\|nmp_\|_nm\|NM\|_NM\|nmtst_\|c_siphash_\|c_list_\).*\)$/\2/p'
|
||||
done) |
|
||||
_sort |
|
||||
grep -Fx -f <(get_symbols_explict) -v |
|
||||
grep -Fx -f <(get_symbols_explicit) -v |
|
||||
grep -Fx -f <(get_symbols_nm)
|
||||
}
|
||||
|
||||
|
|
@ -82,14 +82,17 @@ do_update() {
|
|||
do_generate > ./src/NetworkManager.ver
|
||||
}
|
||||
|
||||
SYMBOLS_MISSING="$(get_symbols_missing | pretty)"
|
||||
SYMBOLS_EXPLICIT="$(get_symbols_explicit | pretty)"
|
||||
|
||||
do_generate() {
|
||||
cat <<EOF
|
||||
# this file is generated by $0
|
||||
{
|
||||
global:
|
||||
$(get_symbols_missing | pretty)
|
||||
$SYMBOLS_MISSING
|
||||
|
||||
$(get_symbols_explict | pretty)
|
||||
$SYMBOLS_EXPLICIT
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue