chore: fix paths

This commit is contained in:
Jesús Pérez Lorenzo 2021-10-14 18:00:04 +01:00
parent 2a34ff44d5
commit a938f28547

View File

@ -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