diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-15 06:22:17 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-15 06:22:17 +0000 |
commit | a42784000e102df0909e8a307c0b0b8ba2938304 (patch) | |
tree | 7aec1108ab1ef8d71badc913fdbacf5919a871f9 /tool | |
parent | f98004c0f2f0b9234981af49d6b6566c37cc8c2d (diff) | |
download | ruby-a42784000e102df0909e8a307c0b0b8ba2938304.tar.gz |
. command in some sh cannot take arguments
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r-- | tool/mjit_archflag.sh | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/tool/mjit_archflag.sh b/tool/mjit_archflag.sh index 4bb3321aff..fc0285e16d 100644 --- a/tool/mjit_archflag.sh +++ b/tool/mjit_archflag.sh @@ -10,21 +10,23 @@ quote() { archs="" arch_flag="" -for arch in $1; do - archs="${archs:+$archs }${arch%=*}" -done +parse_arch_flags() { + for arch in $1; do + archs="${archs:+$archs }${arch%=*}" + done -while shift && [ "$#" -gt 0 ]; do - case "$1" in - -arch) - shift - archs="${archs:+$archs }$1" - ;; - *) - arch_flag="${arch_flag:+${arch_flag} }$1" - ;; - esac -done + while shift && [ "$#" -gt 0 ]; do + case "$1" in + -arch) + shift + archs="${archs:+$archs }$1" + ;; + *) + arch_flag="${arch_flag:+${arch_flag} }$1" + ;; + esac + done +} define_arch_flags() { local indent=${archs:+ } |