From 056a86b9ddb444f9a43443a2aaac3d98e2ebbb3b Mon Sep 17 00:00:00 2001
From: Giorgos Korfiatis <gkorf@grnet.gr>
Date: Mon, 7 Sep 2015 15:31:51 +0300
Subject: [PATCH] add cacert in configure

---
 cacert_hack.sh => cacert_cp.sh | 3 ++-
 configure.sh                   | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
 rename cacert_hack.sh => cacert_cp.sh (84%)

diff --git a/cacert_hack.sh b/cacert_cp.sh
similarity index 84%
rename from cacert_hack.sh
rename to cacert_cp.sh
index 17b05a1..2108e38 100644
--- a/cacert_hack.sh
+++ b/cacert_cp.sh
@@ -18,4 +18,5 @@ CURPWD=$(pwd)
 cd "$(dirname "$0")"
 ROOTDIR=$(pwd)
 
-python -c 'import certifi; print certifi.where()' | xargs -I{} cp {} .
+echo "Copying certifi's cacert.pem"
+python -c "import certifi; import shutil; shutil.copy2(certifi.where(), 'agkyra/resources/cacert.pem')"
diff --git a/configure.sh b/configure.sh
index 2d51cd2..c383263 100755
--- a/configure.sh
+++ b/configure.sh
@@ -22,4 +22,10 @@ ROOTPATH=$(pwd)
 if [ $? -ne 0 ]; then
     exit 1
 fi
+
+./cacert_cp.sh
+if [ $? -ne 0 ]; then
+    exit 1
+fi
+
 echo "Now run 'python setup.py install'."
-- 
GitLab