From f16f53eab50692efbc4e0a731d1ccaa115237fcc Mon Sep 17 00:00:00 2001 From: jaden <noreply@example.com> Date: Mon, 26 Jun 2017 18:26:12 +0200 Subject: [PATCH] trying different way of string splitting --- gitlab/functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitlab/functions.sh b/gitlab/functions.sh index b465ad7..8c9e462 100644 --- a/gitlab/functions.sh +++ b/gitlab/functions.sh @@ -238,11 +238,11 @@ dav_recursive_mkdir() { # split path into an array of path segments # uses a subshell so setting the IFS doesnt mess up *this* shell - local path_segments=($(IFS=/ read -a arr <<< "$1"; echo "$arr")) + IFS=/ read -a path_segments <<< "$1" local current_subpath='' # loop through segments - for seg in "${path_segments[@]}"; do + for seg in $path_segments; do # append each segment to the current subpath current_subpath="${current_subpath}${seg}/" log_info "mkdir $DOCSERVER/$current_subpath" -- GitLab