setup/git.sh: fix finding gitdir

This commit is contained in:
Leah Neukirchen 2021-09-28 22:03:26 +02:00
parent b95f9b8b88
commit 6089ec47be

View file

@ -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