diff --git a/gitlab/install.sh b/gitlab/install.sh
index f2f2600d4824d1b99b1e9cdd25dadeba9172090f..6089fddce0d40a813b65fca1f697efea7c59209c 100755
--- a/gitlab/install.sh
+++ b/gitlab/install.sh
@@ -34,11 +34,12 @@ run_cmd() {
 
 
 get_script() {
+  local url="https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/${2}"
   local curlopt="--location --silent --show-error --output ${1}/${2}"
   if [ -e ${1}/${2} ]; then #check for updates
     local checkopt="${curlopt} --time-cond ${1}/${2} --silent"
     checkopt="${checkopt} --write-out %{http_code}"
-    if [ "$(curl ${checkopt})" == "200" ]; then
+    if [ "$(curl ${checkopt} ${url})" == "200" ]; then
       log_info "CI script ${1}/${2} needs updating..."
       rm -f ${1}/${2}
     else
@@ -47,7 +48,6 @@ get_script() {
     fi
   fi
   # check file needs updating
-  local url="https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/${2}"
   run_cmd curl ${curlopt} ${url}
 }