2016-02-19 13:45:49 +01:00
|
|
|
# This hook executes the following tasks:
|
|
|
|
# - sets the timestamps in a package to the commit date
|
|
|
|
|
|
|
|
hook() {
|
2016-02-29 08:46:40 +01:00
|
|
|
# If XBPS_COMMIT_TIMESTAMP is set, set mtimes to that timestamp.
|
|
|
|
if [ -n "$XBPS_COMMIT_TIMESTAMP" ]; then
|
|
|
|
msg_normal "$pkgver: setting mtimes to %s\n" "$(date --date "$XBPS_COMMIT_TIMESTAMP")"
|
|
|
|
find $PKGDESTDIR -print0 | xargs -0 touch -h --date "$XBPS_COMMIT_TIMESTAMP"
|
2016-02-19 13:45:49 +01:00
|
|
|
fi
|
|
|
|
}
|