ruby-changes:46210
From: nobu <ko1@a...>
Date: Wed, 12 Apr 2017 14:22:42 +0900 (JST)
Subject: [ruby-changes:46210] nobu:r58325 (trunk): git-refresh: for old sh
nobu 2017-04-12 14:22:36 +0900 (Wed, 12 Apr 2017) New Revision: 58325 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58325 Log: git-refresh: for old sh * tool/git-refresh: get rid of matching prefix pattern removal for old sh. [ruby-dev:50069] [Bug #13424] Modified files: trunk/tool/git-refresh Index: tool/git-refresh =================================================================== --- tool/git-refresh (revision 58324) +++ tool/git-refresh (revision 58325) @@ -8,12 +8,12 @@ until [ $# = 0 ]; do https://github.com/ruby/ruby/blob/trunk/tool/git-refresh#L8 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" https://github.com/ruby/ruby/blob/trunk/tool/git-refresh#L24 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/