diff options
author | Simon Rettberg | 2021-07-09 14:49:21 +0200 |
---|---|---|
committer | Simon Rettberg | 2021-07-09 14:49:21 +0200 |
commit | 95af82bfdb2413f8f1851972f2819e47d19f1bc2 (patch) | |
tree | a8c2dbd5b9411e0b5dc9afe185d1d7b2263fd9a2 /core/includes | |
parent | Remove activate_qt helper (diff) | |
download | mltk-95af82bfdb2413f8f1851972f2819e47d19f1bc2.tar.gz mltk-95af82bfdb2413f8f1851972f2819e47d19f1bc2.tar.xz mltk-95af82bfdb2413f8f1851972f2819e47d19f1bc2.zip |
Store cloned repo information in target system
Diffstat (limited to 'core/includes')
-rw-r--r-- | core/includes/downloader.inc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/includes/downloader.inc b/core/includes/downloader.inc index 7de0945d..f280c8ef 100644 --- a/core/includes/downloader.inc +++ b/core/includes/downloader.inc @@ -142,11 +142,10 @@ autoclone () { else git clone "$url" "$dstdir/$dst" || perror "Could not clone $url" if [ -n "$checkout" ]; then - cd "$dstdir/$dst" || perror "cd error. check redbook." - git checkout "$checkout" || perror "Could not checkout $checkout from $url" - cd - + git -C "$dstdir/$dst" checkout "$checkout" || perror "Could not checkout $checkout from $url" fi fi + [ -n "$AUTOCLONE_FILE" ] && echo "$( git rev-parse --abbrev-ref HEAD ) $( git rev-parse --short HEAD )" >> "$AUTOCLONE_FILE" done return 0 } |