diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-12 05:22:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-12 05:22:36 +0000 |
commit | f91985b34d8b35e8907aa1176d2fb9226c9446e3 (patch) | |
tree | dd1db4cd4a21c058a3b42de9941dad4defbe0edf /tool/git-refresh | |
parent | d9df358ea8a627b9dab2ad2977f4d2448aad1e30 (diff) |
git-refresh: for old sh
* tool/git-refresh: get rid of matching prefix pattern removal for
old sh. [ruby-dev:50069] [Bug #13424]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/git-refresh')
-rwxr-xr-x | tool/git-refresh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tool/git-refresh b/tool/git-refresh index e3aa1b0970..fbb50bdcc1 100755 --- a/tool/git-refresh +++ b/tool/git-refresh @@ -8,12 +8,12 @@ until [ $# = 0 ]; do case "$1" in --) shift; break;; -C|--directory) shift; cd "$1";; - -C*) cd "${1#-C}";; - --directory=*) cd "${1#*=}";; + -C*) cd `expr "$1" : '-C\(.*\)'`;; + --directory=*) cd `expr "$1" : '[^=]*=\(.*\)'`;; -q) quiet=1;; -b|--branch) shift; branch="$1";; - -b*) branch="${1#-b}";; - --branch=*) branch="${1#*=}";; + -b*) branch=`expr "$1" : '-b\(.*\)'`;; + --branch=*) branch=`expr "$1" : '[^=]*=\(.*\)'`;; -*) echo "unknown option: $1" 1>&2; exit 1;; *) break;; esac @@ -24,13 +24,13 @@ url="$1" dir="$2" shift 2 if [ -d "$dir" ]; then - echo updating "${dir#*/}" ... + echo updating `expr "$dir" : '*/\(.*\)'` ... [ $quiet ] || set -x cd "$dir" git fetch "$@" exec git checkout ${branch:+"$branch"} "$@" else - echo retrieving "${dir#*/}" ... + echo retrieving `expr "$dir" : '*/\(.*\)'` ... [ $quiet ] || set -x exec git clone "$url" "$dir" "$@" fi |