From 2dd14846e7e7c3eda52ea5f2344f2d4d05102696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismael=20Barros=C2=B2?= Date: Thu, 31 Jul 2014 18:43:51 +0200 Subject: [PATCH] Parameter passing --- findMissingLibraries | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/findMissingLibraries b/findMissingLibraries index 0c89770..d53b0ea 100755 --- a/findMissingLibraries +++ b/findMissingLibraries @@ -20,7 +20,15 @@ while getopts "c" arg; do esac done -bin="${1:-./AppRun}" +bin="./AppRun" +args= + +if [ -n "$1" ]; then + bin="$1" + shift + args=$@ +fi + bin="$(readlink -f "$bin")" process() { @@ -39,4 +47,4 @@ process() { } export APPRUN_HELPERS="strace" -"$bin" | egrep "open\(" | egrep -v ENOENT | egrep -v EACCESS | egrep -o "/usr/.*\\.so[^\"]*" | process +"$bin" $args | egrep "open\(" | egrep -v ENOENT | egrep -v EACCESS | egrep -o "/usr/.*\\.so[^\"]*" | process