Module Name: src
Committed By: christos
Date: Wed May 26 21:58:58 UTC 2021
Modified Files:
src: build.sh
Log Message:
handle different flavors of date(1)
To generate a diff of this commit:
cvs rdiff -u -r1.350 -r1.351 src/build.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/build.sh
diff -u src/build.sh:1.350 src/build.sh:1.351
--- src/build.sh:1.350 Mon May 17 13:12:12 2021
+++ src/build.sh Wed May 26 17:58:58 2021
@@ -1,5 +1,5 @@
#! /usr/bin/env sh
-# $NetBSD: build.sh,v 1.350 2021/05/17 17:12:12 christos Exp $
+# $NetBSD: build.sh,v 1.351 2021/05/26 21:58:58 christos Exp $
#
# Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -1973,7 +1973,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.350 2021/05/17 17:12:12 christos Exp $
+# Generated from: \$NetBSD: build.sh,v 1.351 2021/05/26 21:58:58 christos Exp $
# with these arguments: ${_args}
#
@@ -2299,6 +2299,11 @@ dorump()
statusmsg "Rump build&link tests successful"
}
+repro_date() {
+ # try the bsd date fail back the the linux one
+ (date -u -r "$1" 2> /dev/null) || date -u -d "@$1"
+}
+
setup_mkrepro()
{
if [ ${MKREPRO-no} != "yes" ]; then
@@ -2350,7 +2355,7 @@ setup_mkrepro()
done
[ "${MKREPRO_TIMESTAMP}" != "0" ] || bomb "Failed to compute timestamp"
- statusmsg2 "MKREPRO_TIMESTAMP" "$(TZ=UTC date -r ${MKREPRO_TIMESTAMP})"
+ statusmsg2 "MKREPRO_TIMESTAMP" "$(repro_date "${MKREPRO_TIMESTAMP}")"
export MKREPRO MKREPRO_TIMESTAMP
}