2016-02-19 12:45:49 +00:00
|
|
|
# This hook executes the following tasks:
|
|
|
|
# - sets the timestamps in a package to the commit date
|
|
|
|
|
|
|
|
hook() {
|
2016-03-01 17:27:16 +00:00
|
|
|
# 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"
|
2016-02-19 12:45:49 +00:00
|
|
|
fi
|
|
|
|
}
|