From 4046a99d308b79307730a026477a84d01bfd8683 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 16 Oct 2018 12:19:22 +0200 Subject: [downloader.inc] Try to fix autoclone --- core/includes/downloader.inc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/includes/downloader.inc b/core/includes/downloader.inc index 27076ceb..f1714750 100644 --- a/core/includes/downloader.inc +++ b/core/includes/downloader.inc @@ -91,10 +91,14 @@ autoclone () { for url in $REQUIRED_GIT; do branch= checkout="${url#*||}" - [ -z "$checkout" ] && branch="${url#*|}" + if [ "x$checkout" = "x$url" ]; then + checkout= + branch="${url#*|}" + [ "x$branch" = "x$url" ] && branch= + fi url="${url%%|*}" - dst=${url##*/} - dst=${url%.git} + dst="${url##*/}" + dst="${url%.git}" pinfo "Cloning $url to $dst" if [ -n "$branch" ]; then git clone -b "$branch" "$url" "$dstdir/$dst" || perror "Could not clone $url branch $branch" -- cgit v1.2.3-55-g7522