[Buildroot] [PATCH v2 04/12] support/download/post-process-helpers: add helper function for post process scripts
Yann E. MORIN
yann.morin.1998 at free.fr
Sat Dec 19 20:29:21 UTC 2020
Thomas, All,
A few mre tweaks I forgot about...
On 2020-12-19 18:39 +0100, Yann E. MORIN spake thusly:
> On 2020-12-19 16:35 +0100, Thomas Petazzoni spake thusly:
[--SNIP--]
> > + mkdir ${dest}
Using 'mkdir -p' would ensure that parent direcotries are created as
needed.
>
> one_file="$(find "${dest}" -type f |head -n1)"
Of course, the output should be sorted in the C locale, to ensure the
same file is always used as reference (and hence a better name for that
file):
local ref_file
ref_file="$(find "${dest}" -type f |LC_ALL=C sort |head -n1)"
touch -r "${ref_file}" "${dest}.timestamp"
[--SNIP--]
> > + # let's use a fixed hardcoded date to be reproducible
> > + date="2020-02-06 01:02:03 +0000"
> Assuming that unpack's dest and repack's src are pointing to the same
> directory:
> date="$(stat -c "${src}.timestamp")"
Meh.. I forgot the actual format:
date="$(stat -c '%y' "${src}.timestamp")"
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
More information about the buildroot
mailing list