- document a few additional functions

This commit is contained in:
michel-schinz 2004-06-13 17:51:15 +00:00
parent 4af56d67e8
commit 52003b1578
1 changed files with 30 additions and 1 deletions

View File

@ -1,4 +1,4 @@
%% $Id: install-lib.tex,v 1.1 2004/05/22 10:41:06 michel-schinz Exp $
%% $Id: install-lib.tex,v 1.2 2004/06/13 17:51:15 michel-schinz Exp $
%% TODO
%% - clean up permissions mess
@ -617,6 +617,35 @@ contents is deleted.
\end{enumerate}
\end{example}
\subsubsection{Miscellaneous}
\label{sec:misc}
A few functions which are not specifically related to installation are
provided, as they can sometimes be useful when writing installation
scripts. They are documented below.
\vspace{1em}
\definep{parent-directory}{dir}%
Returns the parent directory of \param{dir}. Notice that a trailing
slash is always ignored by this function, so that the parent directory
of both \file{/tmp/dir} and \file{/tmp/dir/} is \file{/tmp/}.
\vspace{1em}
\definep{create-directory\&parents}{dir}%
Similar to scsh's \ident{create-directory}, but also create all parent
directories which do not exist yet.
\vspace{1em}
\definep{relative-file-name}{fname [dir]}%
Return the name of file \param{fname} relative to \param{dir}, which
defaults to the current directory.
\vspace{1em}
\definep{paths->file-name}{path ...}%
Similar to scsh's \ident{path-list->file-name} except that all
arguments are taken to form the final path. This function has no
equivalent for \ident{path-list->file-name}'s optional argument.
\subsection{Packages containing C code (for shared libraries)}
Packages containing C code are more challenging to write, since all