diff options
author | Patrick Spek <p.spek@tyil.nl> | 2020-03-29 17:37:01 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2020-03-29 17:37:01 +0200 |
commit | 1a3c36278c39a275455a0a524f8a494d90f77324 (patch) | |
tree | f071b471f1eb123fe0260974bd22eb759925e3d6 /lib/actions/install.bash | |
parent | 98c35cddda61236ad92e1ba47cf52ab86a1d16f3 (diff) |
Consolidate fetch data in fetch_core.txt
Diffstat (limited to 'lib/actions/install.bash')
-rw-r--r-- | lib/actions/install.bash | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/actions/install.bash b/lib/actions/install.bash index 42c27f5..0295fb1 100644 --- a/lib/actions/install.bash +++ b/lib/actions/install.bash @@ -18,6 +18,7 @@ action() { local SOURCE_DATE_EPOCH local duration local init + local prefix_absolute while getopts ":b:p:" opt do @@ -32,9 +33,12 @@ action() { # 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" + if [[ -f "$BASEDIR/etc/epoch.txt" ]] + then + SOURCE_DATE_EPOCH="$(head -n1 "$BASEDIR/etc/epoch.txt")" + debug "SOURCE_DATE_EPOCH set to $SOURCE_DATE_EPOCH (epoch.txt)" + fi export LC_ALL export SOURCE_DATE_EPOCH @@ -49,6 +53,10 @@ action() { # on init="$(date +%s)" + # Use an absolute path when reporting about the installation path + prefix_absolute="$(CDPATH="" cd -- "$RSTAR_PREFIX" && pwd -P)" + info "Installing Raku in $prefix_absolute" + # Create the installation directory mkdir -p -- "$RSTAR_PREFIX" @@ -78,16 +86,10 @@ action() { } action_install_core() { - local prefix_absolute - - prefix_absolute="$(CDPATH="" cd -- "$RSTAR_PREFIX" && pwd -P)" - - info "Installing Raku in $prefix_absolute" - # Compile all core components for component in moarvm nqp rakudo do - VERSION="$(config_etc_kv "dist_$component.txt" "version")" \ + VERSION="$(config_etc_kv "fetch_core.txt" "${component}_version")" \ build_"$component" \ --prefix="$RSTAR_PREFIX" \ --relocatable \ |