Subject: Re: Double-quote arguments of "case" statement in
To: None <jlam@NetBSD.org>
From: Masao Uebayashi <uebayasi@pultek.co.jp>
List: tech-pkg
Date: 03/16/2004 17:16:17
Hi.

I found some of these quotes are not actually needed, that is,

> -	case ${BUILDLINK_PREFIX.${_pkg_}} in				\
> +	case "${BUILDLINK_PREFIX.${_pkg_}}" in				\

This is needed because ${BUILDLINK_PREFIX.${_pkg_}} may not be
defined, in which case sh gets "case in ...", which is a syntax error.

The reason why ${_pkg_} is not defined is that if Buildlink'ly
included packages are all "native" counterparts, no real packages are
depended.

> -			case $$src in					\
> +			case "$$src" in					\

This is not needed because sh(1) gets "case $src in ..." which is a
right syntax.

Masao