[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [nmh-workers] Reproducible build patch
From: |
valdis . kletnieks |
Subject: |
Re: [nmh-workers] Reproducible build patch |
Date: |
Tue, 24 Jul 2018 18:53:49 -0400 |
On Tue, 24 Jul 2018 16:40:48 +0100, Ralph Corderoy said:
> How about
> +fmt='%Y-%m-%d %T %z'
> +now=${SOURCE_DATE_EPOCH-$(date +%s)}
> +if date -u -d @42 +"$fmt" >/dev/null 2>&1; then # Coreutils.
> + date=$(date -u -d "@$now" +"$fmt")
> +elif date -u -r 42 +"$fmt" >/dev/null 2>&1; then # BSD.
> + date=$(date -u -r "$now" +"$fmt")
> +else # Posix, ignoring SOURCE_DATE_EPOCH.
> + date=$(date -u +"$fmt")
> +fi
Oh, much better than that date || date || date monstrosity - I was
unable to figure out that the second one was intended for a different
date binary than the first one
pgp61_4wKJi09.pgp
Description: PGP signature
- Re: [nmh-workers] Reproducible build patch, (continued)
- Re: [nmh-workers] Reproducible build patch, Robert Elz, 2018/07/24
- Re: [nmh-workers] Reproducible build patch, Ralph Corderoy, 2018/07/26
- Re: [nmh-workers] Reproducible build patch, Robert Elz, 2018/07/26
- Re: [nmh-workers] Reproducible build patch, Ralph Corderoy, 2018/07/27
- Re: [nmh-workers] Reproducible build patch, Robert Elz, 2018/07/28
- Re: [nmh-workers] Reproducible build patch, Robert Elz, 2018/07/28
- Re: [nmh-workers] Reproducible build patch, Ralph Corderoy, 2018/07/30
- Re: [nmh-workers] Reproducible build patch, Robert Elz, 2018/07/30