diff options
Diffstat (limited to 'scripts/lib/ptxd_lib_reproducible.sh')
-rw-r--r-- | scripts/lib/ptxd_lib_reproducible.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_lib_reproducible.sh b/scripts/lib/ptxd_lib_reproducible.sh new file mode 100644 index 000000000..f0c1bcf8f --- /dev/null +++ b/scripts/lib/ptxd_lib_reproducible.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +# Copyright (C) 2018 by Michael Olbrich <m.olbrich@pengutronix.de> +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +ptxd_lib_reproducible() { + SOURCE_DATE_EPOCH="$(echo $(date --date="${PTXDIST_VERSION_YEAR}-${PTXDIST_VERSION_MONTH}-01 UTC" "+%s"))" + export SOURCE_DATE_EPOCH +} +export -f ptxd_lib_reproducible + +ptxd_lib_reproducible |