From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUJpa-0001fd-PQ for qemu-devel@nongnu.org; Wed, 08 Jun 2011 10:34:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUJpX-0000hm-Qr for qemu-devel@nongnu.org; Wed, 08 Jun 2011 10:34:02 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:62180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUJpX-0000hi-G4 for qemu-devel@nongnu.org; Wed, 08 Jun 2011 10:33:59 -0400 Received: by pxi15 with SMTP id 15so432110pxi.33 for ; Wed, 08 Jun 2011 07:33:58 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 8 Jun 2011 15:33:58 +0100 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 01/12] Add kernel header update script List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: kvm@vger.kernel.org, Marcelo Tosatti , Alexander Graf , qemu-devel@nongnu.org, =?UTF-8?Q?Andreas_F=C3=A4rber?= , Avi Kivity , Christoph Hellwig On 8 June 2011 15:10, Jan Kiszka wrote: > --- /dev/null > +++ b/scripts/update-linux-headers.sh > @@ -0,0 +1,55 @@ > +#!/bin/sh -e > +# > +if [ -z "$output" ]; then > + =C2=A0 =C2=A0output=3D$PWD > +fi > + =C2=A0 =C2=A0mkdir -p $output/linux-headers/asm-$arch This script is rather lacking in quoting throughout. As a random example, this looks like it will break if you run the script from a directory with a space in the path. > +tmpdir=3D$TMPDIR/.tmp-hdrs-$$ Better (safer) to use mktemp, I think. > if [ -z "$linux" -o ! -d "$linux" ]; then test -o is obsolescent in POSIX; use if [ -z "$linux" ] || ! [ -d "$linux" ] ; then instead. -- PMM