Loading bin/ruby-build +6 −2 Original line number Diff line number Diff line Loading @@ -61,6 +61,10 @@ capitalize() { printf "%s" "$1" | tr a-z A-Z } sanitize() { printf "%s" "$1" | sed "s/[^A-Za-z0-9.-]/_/g; s/__*/_/g" } build_failed() { { echo echo "BUILD FAILED" Loading Loading @@ -294,7 +298,7 @@ fetch_git() { if type git &>/dev/null; then if [ -n "$RUBY_BUILD_CACHE_PATH" ]; then pushd "$RUBY_BUILD_CACHE_PATH" >&4 local clone_name=$(echo $git_url | sed "s/[^A-Za-z0-9.-]/_/g; s/__*/_/g") local clone_name="$(sanitize "$git_url")" if [ -e "${clone_name}" ]; then { cd "${clone_name}" git fetch --force "$git_url" "+${git_ref}:${git_ref}" Loading Loading
bin/ruby-build +6 −2 Original line number Diff line number Diff line Loading @@ -61,6 +61,10 @@ capitalize() { printf "%s" "$1" | tr a-z A-Z } sanitize() { printf "%s" "$1" | sed "s/[^A-Za-z0-9.-]/_/g; s/__*/_/g" } build_failed() { { echo echo "BUILD FAILED" Loading Loading @@ -294,7 +298,7 @@ fetch_git() { if type git &>/dev/null; then if [ -n "$RUBY_BUILD_CACHE_PATH" ]; then pushd "$RUBY_BUILD_CACHE_PATH" >&4 local clone_name=$(echo $git_url | sed "s/[^A-Za-z0-9.-]/_/g; s/__*/_/g") local clone_name="$(sanitize "$git_url")" if [ -e "${clone_name}" ]; then { cd "${clone_name}" git fetch --force "$git_url" "+${git_ref}:${git_ref}" Loading