cons-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can we use wildcards to deliver files in Cons?


From: Gary Oberbrunner
Subject: Re: Can we use wildcards to deliver files in Cons?
Date: Thu, 26 Feb 2004 10:58:32 -0500


On Feb 26, 2004, at 10:40 AM, GHOSH, AMIT (HP-ISO STSD-STL) wrote:

My Conscript contains the below (even this does not work)

Command $local_env 'ver*.conf','template.txt',qq(
                createVersion
                cat template.txt > ver$VER.conf
        );

If all createVersion does is create a shell environment variable, then that assignment will disappear when the shell in which createVersion was run exits. You will need to wrap createVersion with a shell script that echoes the env var to a temp file, then read the temp file. Or better yet, do both of the above cmds in a single shell script, something like this:
 #!/bin/sh
 VER=`createVersion` # make createVersion just the right version number
 cat template.txt > ver$VER.conf
then execute that shell script as your Cons command.

But in any case I don't think making 'ver*.conf' the target name will work. If you can't know the version name when the Conscript file is read, you will have to do a 2-pass solution (first time build createVersion, then do the rest of the stuff). If you can execute createVersion at the time the Conscript is read, then just run it with regular perl backquotes and you'll be all set.

-- Gary





reply via email to

[Prev in Thread] Current Thread [Next in Thread]