I just added a feature to install-lib: user-specific default options
through a configuration file.
When installation starts, install-lib looks for a file called
~/.scsh-pkg-defaults.scm and, if it is present, read a single (Scheme)
value from it (using (read)) and evaluate this value quasi-quoted. The
result of this evaluation should be an a-list giving default values for
the installation-script options. For example, with the following file:
;; Defaults for installation of scsh packages
((prefix . "/tmp/root")
(layout . "fhs")
(exclude . ,(lambda (file)
(and (string=? "CVS" (file-name-nondirectory file))
(file-directory? file)))))
the default prefix is "/tmp/root", the default layout is "fhs", etc.
I think this can be pretty useful as most users will always install
with the same prefix and layout. Notice that these default values for
options can always be overridden by command-line options. (Well, almost
always: boolean values which are false by default, like "verbose", can
only be turned on by command-line options, not off. Maybe we should fix
that.)
As you can see above, I added a new option called "exclude" which, for
now, can only be set through this configuration file. This should be a
predicate which, when given the name of a source file/directory,
decides whether this file/directory should be excluded from
installation (#t) or not (#f). The definition given above skips all
"CVS" directories (and their contents), which will hopefully please
Eric.
I also added an option, --no-user-defaults, to ignore the
.scsh-pkg-defaults file even if it exists.
All this is not yet in the LaTeX documentation, but I'll try to add it
soon.
Michel.
|