From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 01/12] Add kernel header update script Date: Wed, 08 Jun 2011 16:39:19 +0200 Message-ID: <4DEF8997.7050108@siemens.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" , Alexander Graf , Christoph Hellwig , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= To: Peter Maydell Return-path: Received: from david.siemens.de ([192.35.17.14]:24474 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752870Ab1FHOj0 (ORCPT ); Wed, 8 Jun 2011 10:39:26 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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