[arch-projects] [mkinitcpio] [PATCH 1/3] mkinitcpio: add -T option

Thomas Bächler thomas at archlinux.org
Tue Nov 19 04:15:58 EST 2013


Am 19.11.2013 04:02, schrieb Dave Reisner:
>> +    [[ -z $buildroot ]] && buildroot=$workdir/root
> 
> You could just define buildroot here as:
> 
>   buildroot=${2:-$workdir/root}

k.
         ;;
>> +        -T|--targetdirectory)
> 
> The name of the flag is a bit weird. One might consider that this is
> similar to -g but with a different output format. Just a suggestion,
> maybe use -d, --generatedir?

I thought about a name quite long and didn't come up with anything
better. I'll take your suggestion if that makes you happier.

> Related: we probably want to make -g and this option mutually exclusive.

But they work just fine in combination. It seems like an unnecessary
restriction.

>> +if [[ -z $_opttargetdir ]]; then
>> +    BUILDROOT=$_d_workdir/root
>> +else
>> +    BUILDROOT=$_opttargetdir
>> +fi
> 
>   BUILDROOT=${_opttargetdir:-$_d_workdir/root}

Your bash magic is better than mine.

Sending v2 later.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/arch-projects/attachments/20131119/8492fc22/attachment.asc>


More information about the arch-projects mailing list