mirror of
https://github.com/rbenv/ruby-build.git
synced 2024-12-29 13:15:33 +01:00
47eda17460
The default settings for LDFLAGS and CPPFLAGS were there since the initial commit to ruby-build: LDFLAGS="-L${PREFIX_PATH}/lib" CPPFLAGS="-I${PREFIX_PATH}/include" However, it's not clear to me what these settings help with. A typical Ruby installation will initialize files in these directories, but it will do so regardless of the environment variables. So, let's remove them and see what breaks.
30 lines
878 B
Bash
Executable file
30 lines
878 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
set -o pipefail
|
|
|
|
if [ $# -ne 2 ]; then
|
|
echo "usage: $0 VERSION RELEASE_DIRECTORY"
|
|
exit 1
|
|
fi
|
|
|
|
version="$1"
|
|
release_directory="$2"
|
|
file="share/ruby-build/${version}"
|
|
|
|
basename="ruby-${version}.tar.gz"
|
|
major_minor_version=$(echo ${version} | cut -d '.' -f 1,2)
|
|
url="https://cache.ruby-lang.org/pub/ruby/${major_minor_version}/${basename}"
|
|
if command -v sha256sum >/dev/null; then
|
|
sha256=$(sha256sum "$release_directory/$basename" | cut -d ' ' -f 1)
|
|
elif command -v shasum >/dev/null; then
|
|
sha256=$(shasum -a 256 "$release_directory/$basename" | cut -d ' ' -f 1)
|
|
else
|
|
echo "$0 requires sha256sum or shasum to be installed on the system."
|
|
exit 1
|
|
fi
|
|
|
|
cat > "$file" <<EOS
|
|
!TODO! copy openssl line from other release with the same major.minor version
|
|
install_package "ruby-${version}" "${url}#${sha256}" enable_shared standard verify_openssl
|
|
EOS
|