qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 01/12] Add kernel header update script


From: Jan Kiszka
Subject: Re: [Qemu-devel] [PATCH 01/12] Add kernel header update script
Date: Wed, 08 Jun 2011 16:39:19 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

On 2011-06-08 16:33, Peter Maydell wrote:
> On 8 June 2011 15:10, Jan Kiszka <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]