Navigation Menu

Skip to content

Commit

Permalink
URLs without anchors do not have checksums
Browse files Browse the repository at this point in the history
  • Loading branch information
sstephenson committed Nov 16, 2012
1 parent 7182bde commit 86f9cb7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/ruby-build
Expand Up @@ -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
Expand Down

0 comments on commit 86f9cb7

Please sign in to comment.