ruby-changes:46219
From: nobu <ko1@a...>
Date: Thu, 13 Apr 2017 16:52:12 +0900 (JST)
Subject: [ruby-changes:46219] nobu:r58335 (trunk): git-refresh: fix expr
nobu 2017-04-13 16:52:05 +0900 (Thu, 13 Apr 2017) New Revision: 58335 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58335 Log: git-refresh: fix expr * tool/git-refresh (dir): surround by slashes to extract base name. [ruby-dev:50070] [Bug #13424] Modified files: trunk/tool/git-refresh Index: tool/git-refresh =================================================================== --- tool/git-refresh (revision 58334) +++ tool/git-refresh (revision 58335) @@ -24,13 +24,13 @@ url="$1" https://github.com/ruby/ruby/blob/trunk/tool/git-refresh#L24 dir="$2" shift 2 if [ -d "$dir" ]; then - echo updating `expr "$dir" : '*/\(.*\)'` ... + echo updating `expr "/$dir/" : '.*/\([^/][^/]*\)/'` ... [ $quiet ] || set -x cd "$dir" git fetch "$@" exec git checkout ${branch:+"$branch"} "$@" else - echo retrieving `expr "$dir" : '*/\(.*\)'` ... + echo retrieving `expr "/$dir/" : '.*/\([^/][^/]*\)/'` ... [ $quiet ] || set -x exec git clone "$url" "$dir" "$@" fi -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/