Date: Thu, 14 Jul 2011 15:15:23 -0400 From: Jung-uk Kim <jkim@FreeBSD.org> To: freebsd-ports@FreeBSD.org Cc: Stephen Montgomery-Smith <stephen@missouri.edu>, "demon@FreeBSD.org" <demon@freebsd.org>, Pav Lucistnik <pav@freebsd.org>, Stephen Montgomery-Smith <stephen@freebsd.org>, "lioux@FreeBSD.org" <lioux@freebsd.org> Subject: Re: [RFC] A trivial change for DESKTOP_ENTRIES (take 2) Message-ID: <201107141515.28791.jkim@FreeBSD.org> In-Reply-To: <4E1F2D7E.4090200@missouri.edu> References: <201107121826.00020.jkim@FreeBSD.org> <201107141347.39261.jkim@FreeBSD.org> <4E1F2D7E.4090200@missouri.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107141515.28791.jkim>