b5e49c48e7
This way we are compatible to the Debians proposal. See [1]. [1] https://gcc.gnu.org/ml/gcc-patches/2015-06/msg02210.html
11 lines
376 B
Bash
11 lines
376 B
Bash
# This hook executes the following tasks:
|
|
# - sets the timestamps in a package to the commit date
|
|
|
|
hook() {
|
|
# If SOURCE_DATE_EPOCH is set, set mtimes to that timestamp.
|
|
if [ -n "$SOURCE_DATE_EPOCH" ]; then
|
|
msg_normal "$pkgver: setting mtimes to %s\n" "$(date --date "@$SOURCE_DATE_EPOCH")"
|
|
find $PKGDESTDIR -print0 | xargs -0 touch -h --date "@$SOURCE_DATE_EPOCH"
|
|
fi
|
|
}
|