File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,10 @@ capitalize() {
6161 printf " %s" " $1 " | tr a-z A-Z
6262}
6363
64+ sanitize () {
65+ printf " %s" " $1 " | sed " s/[^A-Za-z0-9.-]/_/g; s/__*/_/g"
66+ }
67+
6468build_failed () {
6569 { echo
6670 echo " BUILD FAILED"
@@ -294,10 +298,10 @@ fetch_git() {
294298 if type git & > /dev/null; then
295299 if [ -n " $RUBY_BUILD_CACHE_PATH " ]; then
296300 pushd " $RUBY_BUILD_CACHE_PATH " >&4
297- local clone_name=$( echo $git_url | sed " s/[^A-Za-z0-9.-]/_/g; s/__*/_/g " )
301+ local clone_name=" $( sanitize " $git_url " ) "
298302 if [ -e " ${clone_name} " ]; then
299303 { cd " ${clone_name} "
300- git fetch --force " $git_url " " +${git_ref} :${git_ref} "
304+ git fetch --force " $git_url " " +${git_ref} :${git_ref} "
301305 } >&4 2>&1
302306 else
303307 git clone --bare --branch " $git_ref " " $git_url " " ${clone_name} " >&4 2>&1
You can’t perform that action at this time.
0 commit comments