From a72d3c1af5db1b7b582de6fd9cd9ab2af2ad2c0e Mon Sep 17 00:00:00 2001 From: Ghe Rivero Date: Wed, 8 May 2013 14:13:38 +0200 Subject: [PATCH] Ignore errors when ldd'ing static binaries. When trying to get the library dependencies from a static program it fails and die. This scapes the error and continue with the execution. Change-Id: Id3463f2dd77a182ce4f9d9d28165d35f17806892 --- lib/ramdisk-functions | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ramdisk-functions b/lib/ramdisk-functions index 95c50ff2..7010c65b 100644 --- a/lib/ramdisk-functions +++ b/lib/ramdisk-functions @@ -92,8 +92,11 @@ EOF } function copy_required_libs() { + set +e ldd_out=`ldd "$1"` - if [ $? -ne 0 ]; then + local ret_code=$? + set -e + if [ $ret_code -ne 0 ]; then return fi local IFS="