From e320bdfbc72362884d9014790c02a9baeb0d6c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Tue, 7 Nov 2023 11:06:23 +0100 Subject: [PATCH] Add helpful comments explaining ruby-build inner workings --- bin/ruby-build | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/ruby-build b/bin/ruby-build index 427a16ebea..167b6d9952 100755 --- a/bin/ruby-build +++ b/bin/ruby-build @@ -1544,9 +1544,16 @@ fi unset RUBYOPT unset RUBYLIB +# If something goes wrong during building, print error information to stderr. trap build_failed ERR + +# This is where the magic happens: execute commands from the definition +# file while in a temporary build directory. This will typically result in +# `install_package` leading to `build_package_standard`. mkdir -p "$BUILD_PATH" # shellcheck disable=SC1090 source "$DEFINITION_PATH" + +# By default, the temporary build path is wiped after successful build. [ -z "${KEEP_BUILD_PATH}" ] && rm -fr "$BUILD_PATH" trap - ERR