Re: Creating $BDIR before :conf ? [PATCH]
Adriaan de Groot <[email protected]> Fri, 25 Nov 2005 16:51:52 +0100
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
--nextPart2218052.ExusDB1TOF
Content-Type: multipart/mixed;
boundary="Boundary-01=_YMzhDNSp9wr7ukM"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--Boundary-01=_YMzhDNSp9wr7ukM
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
On Friday 25 November 2005 16:40, Bram Moolenaar wrote:
> Adriaan de Groot wrote:
> > :conf write header $BDIR/config.h
> >
> > Works, sortof. :conf write header doesn't create $BDIR
>
> I don't think it is a job of ":conf init". ":conf write header" would
> be a logical place to make sure the destination directory exists.
> This can be done either by recognizing that $BDIR is being used, or just
> for any directory. I think the last is preferred.
Attached patch tries to create the path for the written file and solves my=
=20
problem. I'm not sure what should be done with remote files for writing the=
=20
header.
=2D-=20
These are your friends - Adem
GPG: FEA2 A3FE Adriaan de Groot
--Boundary-01=_YMzhDNSp9wr7ukM
Content-Type: text/x-diff;
charset="iso-8859-1";
name="DoConf.py.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="DoConf.py.diff"
Index: DoConf.py
===================================================================
RCS file: /cvsroot/a-a-p/Exec/DoConf.py,v
retrieving revision 1.7
diff -u -3 -p -r1.7 DoConf.py
--- DoConf.py 5 Sep 2003 19:23:31 -0000 1.7
+++ DoConf.py 25 Nov 2005 15:49:57 -0000
@@ -266,6 +266,9 @@ def doconf(line_nr, recdict, optiondict,
# We copy confdefs.h to the target file. This makes sure the same
# file that was used for testing is used.
from CopyMove import remote_copy_move
+ from Remote import is_url
+ if not is_url(fname):
+ aap_checkdir(rpstack, recdict, fname)
remote_copy_move(rpstack, recdict, 1,
[ {"name" : context.headerfilename} ],
{ "name" : fname }, {}, 0, errmsg = 1)
--Boundary-01=_YMzhDNSp9wr7ukM--
--nextPart2218052.ExusDB1TOF
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)
iD8DBQBDhzMYdqzuAf6io/4RAm3HAJ9s3hVvPu2+wmrUfTELQQpZE7sqKgCgmCK9
FybOCUM84GY+4znenMda6Zk=
=xkci
-----END PGP SIGNATURE-----
--nextPart2218052.ExusDB1TOF--
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click