From 5f80e7f8598c6caceeaf19316afc02bb8222f950 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Mon, 13 Feb 2017 11:03:02 +0100
Subject: [PATCH] Correctly setup installation directory for scripts

---
 gitlab/functions.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gitlab/functions.sh b/gitlab/functions.sh
index 2ae64b5..6474972 100644
--- a/gitlab/functions.sh
+++ b/gitlab/functions.sh
@@ -2,6 +2,7 @@
 # Thu 22 Sep 2016 13:05:54 CEST
 
 # Build utilities
+SCRIPTS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
 
 # Determines the operating system we're using
 osname() {
@@ -285,7 +286,7 @@ else
 fi
 
 # sets up certificates for curl and openssl
-CURL_CA_BUNDLE="$(dirname ${0})/cacert.pem"
+CURL_CA_BUNDLE="${SCRIPTS_DIR}/cacert.pem"
 export_env CURL_CA_BUNDLE
 SSL_CERT_FILE="${CURL_CA_BUNDLE}"
 export_env SSL_CERT_FILE
-- 
GitLab