Suppose you have a latex file (say
test.tex) which a lot of includes (
\includepdf, bibliography files,
\includestandalone etc.) sometimes with relative, sometimes with absolute path's sometimes with graphics path set or with graphics environment variable etc. Included tex files may also include other files as well.
Is there a script say
bundle tex.tex which creates a
zip file which contains a directory containing
test.tex and all includes. This may be flattend i.e. all includes on the same hirarchy level and the includepathes adapted to just filename such that it compiles if it hand it over to someone else. It may be partially flattened (for example with a subdirectory of pictures) or organized in some other sensible way with adapted paths in the sources such that it compiles after unzipping without changing anything.
unzip testbundle.tar will result in a directory
testbundle wich contains
test.tex and all includes such that for example
pdflatex test.tex works on a other machine without further intervention.