diff options
Diffstat (limited to 'script')
-rwxr-xr-x | script/update/project/release | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/script/update/project/release b/script/update/project/release index 519efbcf..69772415 100755 --- a/script/update/project/release +++ b/script/update/project/release @@ -259,8 +259,15 @@ insert_version_files() mktarball() { + # preserve timestamps for reproducible tarballs + tar_implementation="$(tar --version)" + tar_implementation="${tar_implementation% *}" + mtime="" + [ "${tar_implementation}" = "tar (GNU tar)" ] && \ + mtime="--mtime=${versiondate}" + [ "${2%/*}" = "${2}" ] || x_ mkdir -p "${2%/*}" - x_ tar -c "${1}" | xz -T0 -9e > "${2}" + x_ tar -c "${1}" ${mtime} | xz -T0 -9e > "${2}" ( [ "${2%/*}" != "${2}" ] && x_ cd "${2%/*}" x_ sha512sum "${2##*/}" > "${2##*/}.sha512" |