From e36410ee823bffb7e8dbe0be819aa78fc391cbea Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Sun, 20 Nov 2022 04:27:16 +0100 Subject: [PATCH] =?UTF-8?q?make/lib:=20koment=C3=A1=C5=99e=20kolem=20git-r?= =?UTF-8?q?ev-parse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- make/lib.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/make/lib.sh b/make/lib.sh index bc919886..062dc617 100644 --- a/make/lib.sh +++ b/make/lib.sh @@ -60,12 +60,13 @@ function safe_checkout_branch { git fetch --all # Od teď si musíme dát pozor, abychom nezměnili kód, který právě běží. # Zkontrolujeme, že se nemění tahle knihovna a skript, který běží. - if test $(git rev-parse @:make/lib.sh) != $(git rev-parse "$BRANCH":make/lib.sh) + # `git rev-parse` dává SHA-1 hashe objektů, vizte manuálovou stránku pro pochopení. + if test "$(git rev-parse @:make/lib.sh)" != "$(git rev-parse "$BRANCH":make/lib.sh)" then echo >&2 "Změna v make/lib.sh, prosím pullni manuálně" exit 1 fi - if test $(git rev-parse @:"$SCRIPT") != $(git rev-parse "$BRANCH":"$SCRIPT") + if test "$(git rev-parse @:"$SCRIPT")" != "$(git rev-parse "$BRANCH":"$SCRIPT")" then echo >&2 "Změna v $SCRIPT, prosím pullni manuálně" exit 1