[pkg-opensc-commit] [libp11] 221/239: tests: check for libsofthsm in more paths

Eric Dorland eric at moszumanska.debian.org
Sat Oct 17 06:21:36 UTC 2015


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

eric pushed a commit to branch master
in repository libp11.

commit b5daf239e02b71fd42ecbc7d1fe08fd8aaa871bd
Author: Nikos Mavrogiannopoulos <nmav at gnutls.org>
Date:   Tue Sep 15 23:55:58 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/libp11.git



More information about the pkg-opensc-commit mailing list