On 03.03.2012 21:02, Bjoern Lindig wrote:
> Hi Xyne,
>
> this is the noop listening your conversations ...
>>
>> I too think that your PKGBUILDs look good. They're clean and
>> well-structured. The only issue I see is the lack of variable
>> quoting, e.g. I've seen this is many of them:
>>
>> make DESTDIR=${pkgdir} install
>>
>> That will not work if there is a space on the pkgdir path. For
>> example:
>>
>> $ mkdir 'foo bar'
>> $ foo='foo bar'
>> $ cd ${foo}
>> bash: cd: foo: No such file or directory
>
> I'd like to pick up the chance to clearify this for my personal record,
> because I had problem with the space in the pkgdir path. What do you
> suggest? Is this meant by "variable quoting"?
>
> $ cd "${foo}"
>
> What would be a apropriate solution in the PKGBUILD? This?
>
> make DESTDIR="${pkgdir}" install
quoting refers to the " or ' characters (that's called a double/single
quote).
cd "$foo"; is all you need
${foo} can be used in the case where your variable is named "foo", but
you want to add something directly after it without a space:
foo="test"
cd "${foo}bar" -> testbar
whereas:
cd "$foobar" will try to look for a variable called $foobar rather than
using $foo
--
Florian Pritz
signature.asc
Description: OpenPGP digital signature
