From a938f28547f00fa1714b56f040e7a826b79dd526 Mon Sep 17 00:00:00 2001 From: JesusPerez Date: Thu, 14 Oct 2021 18:00:04 +0100 Subject: [PATCH] chore: fix paths --- on_libs.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/on_libs.sh b/on_libs.sh index 9576582..219bd9b 100755 --- a/on_libs.sh +++ b/on_libs.sh @@ -4,10 +4,14 @@ USAGE="on_libs.sh clone|pull REPO_URL has to be set in enviroment: example: export REPO_URL=https://rlung.librecloud.online " +REPO_URL=${REPO_URL:-ssh://git@rlung.librecloud.online:32225} [ "$1" == "-h" ] && echo -e "$USAGE" && exit 1 LIST=" Bin library|LibreCloud/lib_bin CLDS Library|LibreCloud/lib_clds +Datastore Library|LibreCloud/lib_datastores +Datastore defs Library|LibreCloud/lib_datastores_defs +Datastore Conectors Library|LibreCloud/lib_datastores_connectors Defs Library|LibreCloud/lib_defs Webservices Filters Library|LibreCloud/lib_filters GraphQL Library|LibreCloud/lib_graphql @@ -36,10 +40,13 @@ do case "$TASK" in clone) echo "" - git clone "$REPO_URL/$lib_path.git" + name=$(echo $(basename "$lib_path") | sed 's/lib_//g' | sed 's,_,/,g') + if [ ! -d "$name" ] ; then + git clone "$REPO_URL/$lib_path.git" "$name" + fi ;; pull) - dir_path=$(basename "$lib_path") + dir_path=$(basename "$lib_path"| sed 's/lib_//g') if [ -d "$dir_path" ] && [ -d "$dir_path/.git" ]; then echo "" cd "$dir_path" || continue