[GRASS-dev] font path question for Linux and Windows
Glynn Clements
glynn at gclements.plus.com
Fri May 4 01:11:05 EDT 2007
William Kyngesburye wrote:
> > Also I have a proposed modification to the script:
> >
> > Index: mkftcap
> > ===================================================================
> > RCS file: /home/grass/grassrepository/grass6/tools/mkftcap/mkftcap,v
> > retrieving revision 1.6
> > diff -u -r1.6 mkftcap
> > --- mkftcap 3 May 2007 04:25:17 -0000 1.6
> > +++ mkftcap 4 May 2007 03:51:37 -0000
> > @@ -12,7 +12,7 @@
> > for ext in $exts ; do
> > find "$dir" -type f -iname '*.'"$ext" -print \
> > | sed 's!^\(.*\)/\(.*\)$!\2:\1/\2:utf-8:!' \
> > - | sed 's/\.'"$ext"':/:/'
> > + | sed 's/\.'"$ext"':/:/I'
> > done
> > fi
> > done
> >
> > This will case-insensitively match the filename extension when it's
> > stripping it out to form the short name for the font at the start
> > of the line - some files had the extension in capitals and it
> > wasn't matching them. Not a big deal though - just looked a bit
> > uglier. But maybe the I flag for case insensitive matching might
> > not work with all versions of sed.
>
> It's already been discussed (r.in.wms problem) that /I is a GNU
> extension to sed. OSX, at least, is BSD. Don't know what to say
> otherwise...
An alternative is to change -iname to -name, and include both upper-
and lower-case versions of the extension in exts.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list