summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
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