Re: [chrony-dev] [PATCH] Allow to override build date |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] [PATCH] Allow to override build date
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Thu, 5 Oct 2017 09:47:30 +0200
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=mlichvar@xxxxxxxxxx
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 145EC5F298A
On Wed, Oct 04, 2017 at 09:12:24PM +0200, Bernhard M. Wiedemann wrote:
> in order to make builds reproducible.
> See https://reproducible-builds.org/ for why this is good
> and https://reproducible-builds.org/specs/source-date-epoch/
> for the definition of this variable.
That looks useful.
> - split_seconds=`date '+%s'`
> + split_seconds=${SOURCE_DATE_EPOCH:-`date '+%s'`}
> if [ "x$split_seconds" = "x" ]; then
> echo "error: could not get current time, --with-ntp-era option is needed"
> exit 1
Could you please rewrite that assignment to use an if-else statement
checking "x$SOURCE_DATE_EPOCH" != "x"? It seems ":-" should be
supported in any POSIX shell, but I though this would be more
consistent with the rest of the code and bit more readable.
Thanks,
--
Miroslav Lichvar
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.