website-build: build.sh: fix offline builds.

Without that fix, build.sh compares the desired Untitled revision with
the GNU Boot git revision, so the comparison always fail, which leads
to broken offline builds.

This was broken from the start in the commit
cabc1cac08 ("website-build: avoid
unnecessary git fetch").

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
This commit is contained in:
Denis 'GNUtoo' Carikli 2023-12-07 18:50:19 +01:00 committed by Adrien 'neox' Bourmault
parent 6921a76b8d
commit 28247e6aa1
Signed by: neox
GPG Key ID: 2974E1D5F25DFCC8
1 changed files with 2 additions and 1 deletions

View File

@ -51,7 +51,8 @@ sync_repo()
git -C "${dst_path}" checkout "${src_revision}"
fi
elif [ -z "${src_path}" ] ; then
localrev="$(git --no-pager log --oneline HEAD -1 --format='%H')"
localrev="$(git -C "${dst_path}" --no-pager \
log --oneline HEAD -1 --format='%H')"
git -C "${dst_path}" remote get-url origin || \
git -C "${dst_path}" remote add origin "${src_uri}"