summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorjoerg <joerg@NetBSD.org>2021-09-17 21:22:38 +0000
committerjoerg <joerg@NetBSD.org>2021-09-17 21:22:38 +0000
commit6f11a00f9fa1eb633cd20f107e2fb8957d6c8e13 (patch)
tree19c63f14c0daf42ca5983d9f314dd4b7664aa22a /build.sh
parentef5e04d19f67daf45e2f4b5729dad62388876dfc (diff)
Fix timestamp extraction logic for Mercurial repos to use UTC.
Extend logic to also cover "hg archive".
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/build.sh b/build.sh
index bdda43c961e..c19aaa8e03b 100755
--- a/build.sh
+++ b/build.sh
@@ -1,5 +1,5 @@
#! /usr/bin/env sh
-# $NetBSD: build.sh,v 1.356 2021/09/09 15:00:01 martin Exp $
+# $NetBSD: build.sh,v 1.357 2021/09/17 21:22:38 joerg Exp $
#
# Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -1972,7 +1972,7 @@ createmakewrapper()
eval cat <<EOF ${makewrapout}
#! ${HOST_SH}
# Set proper variables to allow easy "make" building of a NetBSD subtree.
-# Generated from: \$NetBSD: build.sh,v 1.356 2021/09/09 15:00:01 martin Exp $
+# Generated from: \$NetBSD: build.sh,v 1.357 2021/09/17 21:22:38 joerg Exp $
# with these arguments: ${_args}
#
@@ -2337,8 +2337,11 @@ setup_mkrepro()
t=$(cd "${d}" && git log -1 --format=%ct)
vcs=git
elif [ -d "${d}.hg" ]; then
- t=$(cd "${d}" &&
- hg log -r . --template '{date(date, "%s")}\n')
+ t=$(hg --repo "$d" log -r . --template '{date.unixtime}\n')
+ vcs=hg
+ elif [ -f "${d}.hg_archival.txt" ]; then
+ local stat=$(print_tooldir_program stat)
+ t=$("${stat}" -t '%s' -f '%m' "${d}.hg_archival.txt")
vcs=hg
else
bomb "Cannot determine VCS for '$d'"