From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH OSSTEST v2 3/3] standalone: Make it possible to pass options to run-test Date: Mon, 5 Oct 2015 14:47:47 +0100 Message-ID: <1444052867.5302.2.camel@citrix.com> References: <1443787531.11707.80.camel@citrix.com> <1443787549-7467-3-git-send-email-ian.campbell@citrix.com> <22034.22017.184756.634540@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <22034.22017.184756.634540@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, 2015-10-05 at 11:50 +0100, Ian Jackson wrote: > Ian Campbell writes ("[PATCH OSSTEST v2 3/3] standalone: Make it possible > to pass options to run-test"): > > Currently the remainder of the comnand line is passed after the host= > > ident, which allows for other idents to be given, which isn't all that > > useful in practice. > ... > > + options= > > + for i in $@ ; do > > + if [ x$i = x-- ] ; then shift; break ; fi > > + options="$options $i" > > + shift > > + done > > Please use an array variable so that it is possible to pass options > containing whitespace etc. Sorry; I realise this is a very marginal > use case but it's definitely a good idea not to paint oneself into a > corner about this kind of thing. Ack.