libdir - locate ROX library directories
libdir
[--version x.y.z]
[--appdir|--libdir]
[--path path]
[--append-path path]
[--prepend-path path]
[--0install site]
library-name
The libdir program is used to locate ROX Desktop application directories. It searches a default path, modified by the options, and prints the full path of the first match it finds. Typically it is used to locate a library stored as an application directory by programs which wish to link against it.
The library-name is the name of the library, specifically it is the name of the application directory the library resides in.
The following options are supported
--version x.y.z
Requests that the version of the library be at least x.y.z. The version is extracted from the AppInfo.xml file. If this is not present or does not contain a Version element then the directory is not selected.
--appdir
Sets the search path to $APPDIRPATH
($HOME/Apps:/usr/local/apps:/usr/apps
) .
--libdir
Sets the search path to $LIBDIRPATH
($HOME/lib:/usr/local/lib:/usr/lib
) . This is the default.
--path path
Sets the search path to path.
--append-path path
Appends path (which may be a single directory or colon separated list of directories) to the search path.
--prepend-path path
Prepends path (which may be a single directory or colon separated list of directories) to the search path.
--0install site
Appends /uri/0install/site/dir to
the search path.
dir is
lib
if the
program is called as
libdir,
apps
otherwise.
APPDIRPATH
Default search path for --appdir
mode. This
defaults to
$HOME/Apps:/usr/local/apps:/usr/apps
.
LIBDIRPATH
Default search path for --libdir
mode. This
defaults to
$HOME/lib:/usr/local/lib:/usr/lib
.
Determining the version number is done with sed and expr. It would be better to use xsltproc.