This repository has been archived on 2024-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
evolution-packages/common/hooks/pre-pkg/90-set-timestamps.sh

11 lines
376 B
Bash
Raw Permalink Normal View History

2023-08-05 21:19:04 +01:00
# 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
}