tech-pkg archive

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

Command substitution using backticks or $(...)



(From pkgsrc-changes)
On 01.05.2020 09:40, Jonathan Perkin wrote:
* On 2020-05-01 at 07:42 BST, Roland Illig wrote:

In pkgsrc the command substitution is usually done via `backticks`, for
compatibility with /bin/sh from Solaris.  To fix the shell parse errors,
the special characters are properly escaped inside the command
substitution.

But we've never used /bin/sh on SunOS?

In 2006, when I used pkgsrc on Solaris 8, I thought /bin/sh were indeed
used.

https://mail-index.netbsd.org/pkgsrc-changes/2006/01/12/0022.html

But at that time, mk/tools/tools.SunOS.mk already said:

TOOLS_PLATFORM.sh?= /bin/ksh

This means the pkglint warnings about $(...) being unsupported have
probably been wrong all the time from 2006 until now.

I'll reverse that warning, suggesting to use $(...) instead of
`backticks` since in that form it is easier to understand how many
backslashes are really needed.

Objections?


Home | Main Index | Thread Index | Old Index