From 43cf550082de321ec5ba027dce49297bcdff5f09 Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Thu, 11 Feb 2021 12:08:16 +0200 Subject: [PATCH] Fixes #103 --- src/common.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common.sh b/src/common.sh index 1c59897f..cbe7b549 100755 --- a/src/common.sh +++ b/src/common.sh @@ -106,8 +106,12 @@ function gitclone(){ then repo_dir=$(echo ${repo_dir} | sed 's%^.*/\([^/]*\)\(\.git\)?$%\1%g') fi - - sudo -u "${BASE_USER}" git clone $clone_params "$build_repo" "$repo_dir" + + if [ "$repo_dir" == "" ]; then + sudo -u "${BASE_USER}" git clone $clone_params "$build_repo" + else + sudo -u "${BASE_USER}" git clone $clone_params "$build_repo" "$repo_dir" + fi if [ "$build_repo" != "$ship_repo" ] then