[RFC] A trivial change for DESKTOP_ENTRIES (take 2)
Jung-uk Kim
jkim at FreeBSD.org
Thu Jul 14 19:15:36 UTC 2011
On Thursday 14 July 2011 01:55 pm, Stephen Montgomery-Smith wrote:
> 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.
I'll commit this version tomorrow unless I see more objection.
> What about dots at the beginning of the filename?
>
> ${SED} -E 's/[[:space:]]+.*//' -E 's/^\.+//'
I think mine's good enough. ;-)
Jung-uk Kim
More information about the freebsd-ports
mailing list