diff options
| author | christos <christos@NetBSD.org> | 2021-05-26 21:58:58 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2021-05-26 21:58:58 +0000 |
| commit | 2adbea1d0b39efabe131c32d572aa9a4ab98ae30 (patch) | |
| tree | f1b1876b191dec97068cc28b06507cc7f2442224 /build.sh | |
| parent | 3f4feae5f7a3a4a40822686a4bba807028509616 (diff) | |
handle different flavors of date(1)
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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 } |
