Hi

While waiting for my compilations to fail I've played with bash, writing a 
script that basically runs:

        lyx -c 'command-sequence ...'

Anyway, the script can be used like this:

euler:test-scripts>./time-lyx.sh
Syntax: time-lyx.sh [options] command-sequence
Example:
 $ time-lyx.sh "lyx-quit;" > result.txt

 $ time-lyx.sh "file-open UserGuide.lyx; lyx-quit;" > result.txt
(note you have to be in the same directory as UserGuide.lyx)

 $ time-lyx.sh -I ~/.lyx/doc "file-open DOC/UserGuide.lyx; lyx-quit;"

Options:
  -v                    Be more verbose
  -n                    Only print commands, do not actually run lyx
  -l lyx                Name of lyx binary
  -f-                   Clear list of configuration files to look for
  -f config-file        Name of additional configuration files to be
                        sourced. The default is to look for time-lyx.conf
                         in ./ and ./
  -m descipriont        A description string
  -I ~/.lyx/doc         Defines replacement for string 'DOC'


And I put the actual script here:

        http://wiki.lyx.org/pmwiki.php/DevelScripts/TimeLyx

in case anyone else wants to try it.

/Christian

PS. I've never written bash scripts before, so pointers/tips are welcome.
I'd especially like to know how to do the equivalence of ${VAR:q} in tcsh.


-- 
Christian Ridderström                           http://www.md.kth.se/~chr


Reply via email to