From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUJun-00035p-9a for qemu-devel@nongnu.org; Wed, 08 Jun 2011 10:39:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUJul-0001Z7-1l for qemu-devel@nongnu.org; Wed, 08 Jun 2011 10:39:24 -0400 Received: from david.siemens.de ([192.35.17.14]:21317) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUJuk-0001Yy-CZ for qemu-devel@nongnu.org; Wed, 08 Jun 2011 10:39:22 -0400 Message-ID: <4DEF8997.7050108@siemens.com> Date: Wed, 08 Jun 2011 16:39:19 +0200 From: Jan Kiszka MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: Peter Maydell Cc: "kvm@vger.kernel.org" , Marcelo Tosatti , Alexander Graf , "qemu-devel@nongnu.org" , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , Avi Kivity , Christoph Hellwig On 2011-06-08 16:33, Peter Maydell wrote: > 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 >> + output=$PWD >> +fi > >> + mkdir -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. True. > >> +tmpdir=$TMPDIR/.tmp-hdrs-$$ > > Better (safer) to use mktemp, I think. Is that portable? I don't think so. > >> if [ -z "$linux" -o ! -d "$linux" ]; then > > test -o is obsolescent in POSIX; use > if [ -z "$linux" ] || ! [ -d "$linux" ] ; then > instead. > OK. Thanks, Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux