diff options
author | Patrick Spek <p.spek@tyil.nl> | 2020-03-29 16:36:57 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2020-03-29 16:36:57 +0200 |
commit | 98c35cddda61236ad92e1ba47cf52ab86a1d16f3 (patch) | |
tree | d1794ae602b2fad9dc58b9962096e82e8c624cf1 /lib/actions/install.bash | |
parent | 634edd83bb9ba0cc2c661fb8c6a56509c3573355 (diff) |
Add LC_ALL and SOURCE_DATE_EPOCH to install action
These are strongly advised to be set when working towards reproducible
builds. While I'm unsure if any of the Raku components actually support
it, there's no harm in having them.
Diffstat (limited to 'lib/actions/install.bash')
-rw-r--r-- | lib/actions/install.bash | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/actions/install.bash b/lib/actions/install.bash index 9e4b010..42c27f5 100644 --- a/lib/actions/install.bash +++ b/lib/actions/install.bash @@ -13,7 +13,9 @@ RSTAR_DEPS_PERL+=( ) action() { + local LC_ALL local OPTIND + local SOURCE_DATE_EPOCH local duration local init @@ -28,7 +30,14 @@ action() { shift $(( OPTIND - 1 )) - mkdir -p -- "$RSTAR_PREFIX" + # Prepare environment for a reproducible install + LC_ALL=C.UTF-8 + SOURCE_DATE_EPOCH="$(git log -1 --pretty=format:%at)" + + debug "SOURCE_DATE_EPOCH set to $SOURCE_DATE_EPOCH" + + export LC_ALL + export SOURCE_DATE_EPOCH # If no specific targets are specified, set all targets if (( $# < 1 )) @@ -40,6 +49,9 @@ action() { # on init="$(date +%s)" + # Create the installation directory + mkdir -p -- "$RSTAR_PREFIX" + # Run each installation target for target in "$@" do |