From 381b339b9f8c57fd05c8d365d973df72ba87ca3b Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Wed, 2 Nov 2016 22:39:12 +0100 Subject: [PATCH] Build system: Fix _build/github-clone.sh --- _build/github-clone.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/_build/github-clone.sh b/_build/github-clone.sh index 2937ecd..e8cb1de 100755 --- a/_build/github-clone.sh +++ b/_build/github-clone.sh @@ -23,11 +23,7 @@ printf 'CLONE_REPO_BRANCH="%s"\n' "$CLONE_REPO_BRANCH" echo # clone repo -git clone "$CLONE_REPO_URL" "$CLONE_TARGET_DIR" - -# checkout branch -if [ -n "$CLONE_REPO_BRANCH" ]; then - git checkout "$CLONE_REPO_BRANCH" -fi +[ -n "$CLONE_REPO_BRANCH" ] || CLONE_REPO_BRANCH="master" +git clone --branch="$CLONE_REPO_BRANCH" "$CLONE_REPO_URL" "$CLONE_TARGET_DIR" echo