From 52003b157869ce3850cc48fd3f3fce11ab215ca4 Mon Sep 17 00:00:00 2001 From: michel-schinz Date: Sun, 13 Jun 2004 17:51:15 +0000 Subject: [PATCH] - document a few additional functions --- doc/latex/install-lib.tex | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/doc/latex/install-lib.tex b/doc/latex/install-lib.tex index 541b0a1..d27d018 100644 --- a/doc/latex/install-lib.tex +++ b/doc/latex/install-lib.tex @@ -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