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
This commit is contained in:
parent
38174633e2
commit
e1557424b3
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user