-
Notifications
You must be signed in to change notification settings - Fork 41
LuaDist: Use
This page describes the basic use of the command line interface LuaDist provides.
LuaDist deployment utility itself is implemented as Lua package with a simple API. For convinience a commandline interface is provided. By calling the ./bin/luadist script without arguments the following default printout should help you understand basic functionality provided:
> luadist
LuaDist 1.0.0 - Simple Lua Distribution and Deployment System
Usage: luadist (depldir) [command] [name] (version) (variables)
where [...] are required and (...) are optional:
depldir - Optional path to the deployment directory LuaDist will operate on.
command - Specifies the operation to be executed:
help - Display detailed help about command.
install - Install Dist.
remove - Remove Dist.
pack - Pack Dist.
search - Search for Dist.
list - List installed Dists.
info - Show details about installed Dist.
manifest - Generate manifest for web repository.
make - Build and install dist from local directory.
name - Dist name (case sensitive), URL or path to dist file.
version - Desired version constraints (optional).
variables - CMake variables to be passed into the build process (optional).
Example:
installing luasocket
> luadist install luasocket
installing nanoki 1.10 to its own deployment directory
> luadist /nanoki install nanoki 1.10
For additional help invoke
> luadist help command
One of the most basic operations in LuaDist is to install a dist. LuaDist was designed to deploy applications into multiple directories so the first expected argument is a path LuaDist will operate on. This depldir can be existing LuaDist deployment or a new desired deployment directory. When this argument is omitted LuaDist will use deployment directory it resides in.
For example to install md5 into LuaDist you can simply use:
> luadist install md5
If you would like to install md5 into a separate directory with all its dependencies use:
> luadist /path/to/my_md5 install md5
Restricting the version you desire to install can be achieved by providing the optional version argument.
Similarly to the install command searching for available modules uses almost exactly the same syntax.
For example we can search for any dists that contain jit in their name.
> luadist search jit
Searches can be restricted by version constraints but do not allow searching by anything other than dist name at the moment.
Using the info command additional information about deployed and available dists can be obtained.
> luadist info lua
Will display information about the dist such as: maintainers, authors, source location, dependencies etc.
To obtain binary dist package a pack command is provided. Invoking the command will pack a dist into an archive inside the current directory. NOTE: this feature requires available zip, it does not install by default.
For example invoking:
> luadist pack lua
This will create dist named appropriately according to the naming conventions, for osx the result may be lua-5.1.4-Darwin-i386.dist
Removing an installed dist is done using the remove command. Note that doing this may break dependencies.
The command line utility accepts additional arguments such as -verbose=true or -debug=false. These arguments override default values of LuaDist configuration and any configuration value can be changed.
Additionally any CMake arguments can be provided when building source dists. The syntax is to prefix any variable you wish to modify with -D. For example -DCMAKE_BUILD_TYPE=Release can be used to force CMake to build release version of the dist.
LuaDist provides a simple interface to its functionality with the "dist" module. Currently there is no API documentation available yet but feel free to read the source if you intend to use LuaDist functionality in your apps.