Re: Renaming files in :copy?

Bram Moolenaar <[email protected]> Sat, 04 Feb 2006 13:42:09 +0100
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
Adriaan de Groot wrote:

> I have a source file foo.png and I want to copy it (on installation)
> to location bar/blurfl.png and _rename_ it in the process (to
> blurfl.png, as you can see). I don't see how this can be done with
> :copy, nor in the install targets.=20
>=20
> You may ask: why not just rename to blurfl in the source and be done wi=
th it?=20
> Well, there's various historic reasons,and compatibility with another b=
uild=20
> system is one of them - for KDE icons, in particular, we use=20
> theme-size-type-iconname, which gets installed to=20
> theme/sizexsize/type/iconname . This is a mess, I know, but that's how =
it is.=20
> I have a python function in the KDE module to map one to the other (did=
 I=20
> mention that type needs to be munged to work? as well as theme?), but n=
o way=20
> to use this mapping in the regular install targets.
>=20
> The attached patch adds an {installfile} attribute analogous to the=20
> {installdir} attribute, which overrides the basename of the file to ins=
tall.=20
> Using {installdir} and {installfile} you can install a file to any loca=
tion=20
> you need.
>=20
> Does this sound reasonable? If so, I'll write docs for it too.

It does sound reasonable to me.

--=20
If VIM were a woman, I'd marry her.  Slim, organized, helpful
and beautiful; what's not to like?     --David A. Rogers

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \=
\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ =
\\\
\\\        download, build and distribute -- http://www.A-A-P.org        =
///
 \\\            help me help AIDS victims -- http://www.ICCF.nl         /=
//


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi=
les
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat=3D=
121642