wayland-egl: fail symbol check if lib is missing
authorEric Engestrom <eric.engestrom@imgtec.com>
Mon, 30 Oct 2017 15:27:49 +0000 (15:27 +0000)
committerEric Engestrom <eric.engestrom@imgtec.com>
Tue, 31 Oct 2017 17:59:24 +0000 (17:59 +0000)
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/wayland/wayland-egl/wayland-egl-symbols-check

index e7105ea5793784a7ca16d29ba7faa507ebeb2626..04b2dbf1d3767703172077909f634035a6675c44 100755 (executable)
@@ -1,6 +1,14 @@
 #!/bin/sh
+set -eu
 
-FUNCS=$(nm -D --defined-only ${1-.libs/libwayland-egl.so} | grep -o "T .*" | cut -c 3- | while read func; do
+LIB=${1-.libs/libwayland-egl.so}
+
+if ! [ -f "$LIB" ]
+then
+  exit 1
+fi
+
+FUNCS=$(nm -D --defined-only $LIB | grep -o "T .*" | cut -c 3- | while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
 wl_egl_window_resize
 wl_egl_window_create