diff options
author | Simon Rettberg | 2018-10-16 12:19:22 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-10-16 12:19:22 +0200 |
commit | 4046a99d308b79307730a026477a84d01bfd8683 (patch) | |
tree | 34fdc2edafa2991704fe9b198dd63a5fc48a3834 /core/includes | |
parent | [fileutil.inc] Add cde, cd with error handling (diff) | |
download | mltk-4046a99d308b79307730a026477a84d01bfd8683.tar.gz mltk-4046a99d308b79307730a026477a84d01bfd8683.tar.xz mltk-4046a99d308b79307730a026477a84d01bfd8683.zip |
[downloader.inc] Try to fix autoclone
Diffstat (limited to 'core/includes')
-rw-r--r-- | core/includes/downloader.inc | 10 |
1 files changed, 7 insertions, 3 deletions
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" |