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