From 6261b66a25ae457864dbd6657d27dedf191b0754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Wed, 2 Oct 2019 14:51:39 +0200 Subject: [PATCH] build_nim.sh: also rebuild when the compiled commit is newer than the last Nim repo commit (useful when switching branches) --- scripts/build_nim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_nim.sh b/scripts/build_nim.sh index 897c5cf..be2623a 100755 --- a/scripts/build_nim.sh +++ b/scripts/build_nim.sh @@ -56,7 +56,7 @@ nim_needs_rebuilding() { fi # compare the built commit's timestamp to the date of the last commit (keep in mind that Git doesn't preserve file timestamps) - if [[ -e "${NIM_DIR}/bin/timestamp" && $(cat "${NIM_DIR}/bin/timestamp") -ge $(cd "$NIM_DIR"; git log --pretty=format:%cd -n 1 --date=unix) ]]; then + if [[ -e "${NIM_DIR}/bin/timestamp" && $(cat "${NIM_DIR}/bin/timestamp") -ne $(cd "$NIM_DIR"; git log --pretty=format:%cd -n 1 --date=unix) ]]; then return $NO_REBUILD else return $REBUILD