2020-03-09 11:57:18 +01:00
|
|
|
#!/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}"
|
|
|
|
|
2021-11-09 11:22:19 +01:00
|
|
|
basename="ruby-${version}.tar.gz"
|
2020-03-09 11:57:18 +01:00
|
|
|
major_minor_version=$(echo ${version} | cut -d '.' -f 1,2)
|
|
|
|
url="https://cache.ruby-lang.org/pub/ruby/${major_minor_version}/${basename}"
|
|
|
|
sha256=$(sha256sum "$release_directory/$basename" | cut -d ' ' -f 1)
|
|
|
|
|
|
|
|
cat > "$file" <<EOS
|
2022-07-12 12:21:59 +02:00
|
|
|
!TODO! copy openssl line from other release with the same major.minor version
|
2020-03-09 11:57:18 +01:00
|
|
|
install_package "ruby-${version}" "${url}#${sha256}" ldflags_dirs enable_shared standard verify_openssl
|
|
|
|
EOS
|