[pkg-opensc-commit] [engine-pkcs11] 133/152: tests: check for libsofthsm in more paths

Eric Dorland eric at moszumanska.debian.org
Mon Oct 19 03:11:25 UTC 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository engine-pkcs11.

commit d833e493241db45375996683b67792e7ac282818
Author: Nikos Mavrogiannopoulos <nmav at gnutls.org>
Date:   Tue Sep 15 23:55:41 2015 +0200

    tests: check for libsofthsm in more paths
---
 tests/common.sh | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/tests/common.sh b/tests/common.sh
index 470c6f5..9996f4f 100644
--- a/tests/common.sh
+++ b/tests/common.sh
@@ -19,19 +19,17 @@
 
 mkdir -p $outdir
 
-if test -f /usr/lib64/pkcs11/libsofthsm2.so; then
-	ADDITIONAL_PARAM="/usr/lib64/pkcs11/libsofthsm2.so"
-else
-	if test -f /usr/lib/softhsm/libsofthsm.so; then
-		ADDITIONAL_PARAM="/usr/lib/softhsm/libsofthsm.so"
+for i in /usr/lib64/pkcs11 /usr/lib/softhsm /usr/lib/x86_64-linux-gnu/softhsm /usr/lib /usr/lib64/softhsm;do
+	if test -f "$i/libsofthsm2.so"; then
+		ADDITIONAL_PARAM="$i/libsofthsm2.so"
+		break
 	else
-		if test -f /usr/lib/libsofthsm.so; then
-			ADDITIONAL_PARAM="/usr/lib/libsofthsm.so"
-		else
-			ADDITIONAL_PARAM="/usr/lib64/softhsm/libsofthsm.so"
+		if test -f "$i/libsofthsm.so";then
+			ADDITIONAL_PARAM="$i/libsofthsm.so"
+			break
 		fi
 	fi
-fi
+done
 
 if ! test -x /usr/bin/pkcs11-tool;then
 	exit 77

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/engine-pkcs11.git



More information about the pkg-opensc-commit mailing list