[RFC] A trivial change for DESKTOP_ENTRIES (take 2)

Stephen Montgomery-Smith stephen at missouri.edu
Thu Jul 14 17:55:17 UTC 2011


On 07/14/2011 12:47 PM, Jung-uk Kim wrote:

> Anyhow, I guess we can do it much simpler:
>
> --- Mk/bsd.port.mk      3 Jul 2011 15:51:18 -0000       1.687
> +++ Mk/bsd.port.mk      14 Jul 2011 17:26:43 -0000
> @@ -6432,7 +6432,7 @@
>   		${ECHO_CMD} "@cwd ${DESKTOPDIR}">>  ${TMPPLIST}; \
>   	fi; \
>   	while [ $$# -gt 6 ]; do \
> -		filename="`${ECHO_CMD} "$$4" | ${TR} -cd [:alnum:]`.desktop"; \
> +		filename="`${BASENAME} "$$4" | ${SED} -E 's/[[:space:]]+.*//'`.desktop"; \
>   		pathname="${DESKTOPDIR}/$$filename"; \
>   		categories="$$5"; \
>   		if [ -z "$$categories" ]; then \
>
> I think this is much simpler and better fix.
>
> Jung-uk Kim

I agree.

What about dots at the beginning of the filename?

${SED} -E 's/[[:space:]]+.*//' -E 's/^\.+//'



More information about the freebsd-ports mailing list