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

Re: [MiNT] rpm brace expansion



On Sat, Jan 16, 2010 at 7:01 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Eero Tamminen <oak@helsinkinet.fi> writes:
>
>> Hi,
>>
>> On Sunday 17 January 2010, Eero Tamminen wrote:
>>> On Debian derived systems there's a script in the "devscripts" package
>>> for checking Bashisms on scripts called "checkbashisms".
>>
>> Btw. POSIX shell has most of the Bash features.  It support some of
>> the brace expansions too, just not the one using commas.
>
> There is no brace expansion without a comma.
>
> Andreas.
>

there should be variable arrays using spaces

There is nothing in the second link provided that mentions the type of
variable described here as used by RPM

"The curly-brace { } characters are designated as possible control
operators in a future issue; they are currently reserved words" - this
was the first mention near the top of the page, even though there is a
section on expansion

The first link provides:
The format for parameter expansion is as follows: ${expression}
The simplest form for parameter expansion is: ${parameter}
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_02

There is a table, but it does not contain any comma reference. This
implies a Bashism

The quickest way to continue would be to use a space separated list,
as described in foreach use.

One question re:RPM, how many packages use the {/usr/bin,usr/sbin} in
there package scripts.. There must be a suitable solution already
provide by the greater linux community in order to transition to a
posix sh

Paul