aboutsummaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-13 07:52:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-13 07:52:05 +0000
commit67ba7ad3e69b75ff21d744a595074883493dbdc7 (patch)
tree9672f4f19bd843ef1e69a473f0bf82782d894f3a /tool
parent8f18aa06c8b4c2d8700ccd514368384dc39c7610 (diff)
downloadruby-67ba7ad3e69b75ff21d744a595074883493dbdc7.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')
-rwxr-xr-xtool/git-refresh4
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