summaryrefslogtreecommitdiff
path: root/src/librefetch/librefetchdir/libmakepkg
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-04-14 23:08:15 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-04-14 23:08:15 -0400
commit608915e7ed511ac38546d4c3a22b453ba638dfc1 (patch)
treeda17ecdb3858211105b7dd7efb1bd7991fb93fee /src/librefetch/librefetchdir/libmakepkg
parentac02e8c43ff1fbaf1086d746a1a0a975c9218ef0 (diff)
librefetch: support SOURCE_DATE_EPOCH
fixes https://labs.parabola.nu/issues/884
Diffstat (limited to 'src/librefetch/librefetchdir/libmakepkg')
-rwxr-xr-xsrc/librefetch/librefetchdir/libmakepkg/tidy/~source_date_epoch.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librefetch/librefetchdir/libmakepkg/tidy/~source_date_epoch.sh b/src/librefetch/librefetchdir/libmakepkg/tidy/~source_date_epoch.sh
index 562820b..fec7686 100755
--- a/src/librefetch/librefetchdir/libmakepkg/tidy/~source_date_epoch.sh
+++ b/src/librefetch/librefetchdir/libmakepkg/tidy/~source_date_epoch.sh
@@ -27,5 +27,9 @@ LIBMAKEPKG_TIDY_SOURCE_DATE_EPOCH_SH=1
tidy_modify+=('tidy_source_date_epoch')
tidy_source_date_epoch() {
- find . -exec touch --no-dereference --date="1990-01-01 0:0:0 +0" -- {} +
+ local date='1990-01-01 0:0:0 +0'
+ if [[ -n "$SOURCE_DATE_EPOCH" ]]; then
+ date="@$SOURCE_DATE_EPOCH"
+ fi
+ find . -exec touch --no-dereference --date="$date" -- {} +
}