diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-13 07:52:05 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-13 07:52:05 +0000 |
commit | e1557424b3655a58342a03b0147b33b48a1e00d3 (patch) | |
tree | 9672f4f19bd843ef1e69a473f0bf82782d894f3a /tool/git-refresh | |
parent | 38174633e23737bb711ab6d38856979b327d175c (diff) | |
download | ruby-e1557424b3655a58342a03b0147b33b48a1e00d3.tar.gz |
git-refresh: fix expr
* tool/git-refresh (dir): surround by slashes to extract base
name. [ruby-dev:50070] [Bug #13424]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/git-refresh')
-rwxr-xr-x | tool/git-refresh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/git-refresh b/tool/git-refresh index fbb50bdcc1..88ed70f757 100755 --- a/tool/git-refresh +++ b/tool/git-refresh @@ -24,13 +24,13 @@ url="$1" 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 |