1
0
Fork 0
mirror of https://github.com/rbenv/ruby-build.git synced 2025-06-18 17:58:04 +02:00

URLs without anchors do not have checksums

This commit is contained in:
Sam Stephenson 2012-11-16 10:30:49 -06:00
parent 7182bde310
commit 86f9cb7d60

View file

@ -204,9 +204,10 @@ fetch_tarball() {
local package_name="$1"
local package_url="$2"
local mirror_url
local checksum
local checksum="${package_url#*\#}"
if [ -n "$checksum" ]; then
if [ "$package_url" != "${package_url/\#}" ]; then
checksum="${package_url#*#}"
package_url="${package_url%%#*}"
if [ -n "$RUBY_BUILD_MIRROR_URL" ]; then