From e069ba0a28bf15a1985d0363bd13ebce232077c9 Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Fri, 25 Sep 2020 08:28:31 +0200 Subject: [PATCH] filter out additional garbage input from ls-remote --- mirror.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirror.sh b/mirror.sh index 92d7bc2..a125a06 100755 --- a/mirror.sh +++ b/mirror.sh @@ -5,7 +5,7 @@ GITHUB_REPO_URL=https://${access_token}@github.com/minetest-mirrors/${github_rep # fetch commit-checksums LOCAL_SHA=$(git ls-remote "${GITHUB_REPO_URL}" ${branch} | cut -f1) -REMOTE_SHA=$(git ls-remote "${source_repo}" ${branch} | cut -f1) +REMOTE_SHA=$(git ls-remote "${source_repo}" ${branch} | head -n1 | cut -f1) echo "Local sha: ${LOCAL_SHA} (${github_repo})" echo "Remote sha: ${REMOTE_SHA} (${source_repo})"