5.1 Unix

A ‘.foo command’ record in the script asks to execute the given command for each entry ’File: abc.foo’ in the .lg file. A %%0 stands for the job name, a %%1 stands for the file name (e.g., ’abc’) without the extension. A %%~ stands for the value of ${SELFAUTOPARENT} under KPATHSEA, and just ‘~’ when such a value is unavailable.

<..unix openoffice..>
 <oo>
 %%% openoffice                                                      %
 .4oo mkdir sxw-%%0.dir
 .4os mkdir sxw-%%0.dir/Pictures
 .4os mv    %%1.4os         sxw-%%0.dir/settings.xml
 .4oo mv    %%0.4oo         sxw-%%0.dir/content.xml
 %                                                                   %
 .4om mkdir sxw-%%0.dir/%%1
 .4om mv    %%1.4om         sxw-%%0.dir/%%1/content.xml
 .4om cp    sxw-%%0.dir/settings.xml  sxw-%%0.dir/%%1/settings.xml
 %                                                                   %
 .4of mkdir sxw-%%0.dir/META-INF
 .4of mv    %%1.4of         sxw-%%0.dir/META-INF/manifest.xml
 %                                                                   %
 .4ot mv    %%1.4ot         sxw-%%0.dir/meta.xml
 .4oy mv    %%1.4oy         sxw-%%0.dir/styles.xml
 % .4og cp  --parents %%1   Pictures
 .4og mkdir -p              sxw-%%0.dir/Pictures/%%1
 .4og rmdir                 sxw-%%0.dir/Pictures/%%1
 .4og cp    %%1             sxw-%%0.dir/Pictures/%%1
 %-- sxw --                                                          %
 .4ox cd sxw-%%0.dir; zip -r %%0.sxw * ; cd ..
 %                                                                   %
 .4ox mv    sxw-%%0.dir/%%0.sxw .
 %                                                                   %
 .4ox rm    %%1.4ox
 .4ox rm -r -f sxw-%%0.dir
 %-- odt --                                                          %
 .4od cd sxw-%%0.dir; zip -r %%0.odt * ; cd ..
 %                                                                   %
 .4od mv    sxw-%%0.dir/%%0.odt .
 %                                                                   %
 .4od rm    %%1.4od
 .4od rm -r -f sxw-%%0.dir
 %%% end openoffice                                                  %
 </oo>
 -_-_-