I'm trying to write a tupfile in lua that will zip the contents of a 
directory including all subfolders and their contents. Here's my folder 
structure:

* root/
    * .tup/
    * out/
        * data.zip
    * data/
        * scripts/
            * script_a.lua
            * script_b.lua
        * resources/
            * cool_pic.jpg
            * reaction.gif
        * tfm.pdf
        * Tupfile.lua
    * Tuprules.lua

The desired result is to zip the contents of "data" to "out/data.zip." 

If I generate "data/Tupfile.lua" to contain a table of the subdirectories, 
I'm able to produce the desired output, but that requires too much external 
management if the directory structure changes.

My next thought was to add "data/Tupdefault.lua" to crawl the 
subdirectories and add the contents to a global group that could be 
referenced in a "root/Tupfile.lua" that would create output files based on 
the name of the groups.
I think `tup.nodevariable()` will give me what I need, but I can't seem to 
find a way to share the variable with another script. 

Can someone provide some insight into how to share variables in lua files 
or some other way to group multiple files from multiple directories into a 
single output?

-- 
-- 
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to