From 6089ec47be772bb65f00bd5d8178ac5448c4bc4f Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Tue, 28 Sep 2021 22:03:26 +0200 Subject: [PATCH] setup/git.sh: fix finding gitdir --- common/environment/setup/git.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/environment/setup/git.sh b/common/environment/setup/git.sh index 80bbc13e3f..bd72f2eae3 100644 --- a/common/environment/setup/git.sh +++ b/common/environment/setup/git.sh @@ -17,7 +17,7 @@ elif [ -z "${SOURCE_DATE_EPOCH}" ]; then if [ -n "$basepkg" -a -z "$($XBPS_GIT_CMD -C ${XBPS_SRCPKGDIR}/${basepkg} ls-files template)" ]; then export SOURCE_DATE_EPOCH="$(stat -c %Y ${XBPS_SRCPKGDIR}/${basepkg}/template)" else - export SOURCE_DATE_EPOCH=$($XBPS_GIT_CMD cat-file commit HEAD | + export SOURCE_DATE_EPOCH=$($XBPS_GIT_CMD -C ${XBPS_DISTDIR} cat-file commit HEAD | sed -n '/^committer /{s/.*> \([0-9][0-9]*\) [-+][0-9].*/\1/p;q}') fi fi