From 0b0416e7d4bf14e251342a928589c9945b040487 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.anjos@idiap.ch>
Date: Thu, 26 Jan 2017 09:01:40 +0100
Subject: [PATCH] Allows curl to printout successful DAV creations

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

diff --git a/gitlab/functions.sh b/gitlab/functions.sh
index f0264be..00fa382 100644
--- a/gitlab/functions.sh
+++ b/gitlab/functions.sh
@@ -166,7 +166,7 @@ setup_deploy() {
 doc_upload() {
   log_info "curl: ${1} -> ${DOCSERVER}/${2}..."
   local code=`curl --location --silent --fail --write-out "%{http_code}" --user "${DOCUSER}:${DOCPASS}" --upload-file ${1} ${DOCSERVER}/${2}`
-  if [[ ${code} == 204 || ${code} == 201 ]]; then
+  if [[ ${code} == *204 || ${code} == *201 ]]; then
     log_info "Successfully uploaded ${1} with curl"
   else
     log_error "Curl command finished with an error condition (code=${code}):"
-- 
GitLab