Cleanup docs a bit

This commit is contained in:
Akash Manohar J 2015-05-17 23:20:08 +05:30
parent 52ce0afcf4
commit ec29a48342

View File

@ -1,19 +1,13 @@
## Creating package sources ## Creating package sources
A package source is a git repo, with the following executable scripts A package source is a git repo, with a couple executable scripts. These scripts are run when `list-all`, `install`, `uninstall` or `exec-env` commands are run. You can set or unset env vars and do anything required to setup the environment for the tool.
### Required scripts
* `bin/list-all` - lists all installable versions * `bin/list-all` - lists all installable versions
* `bin/install` - installs the specified version * `bin/install` - installs the specified version
##### bin/list-all
##### Optional scripts
* `bin/list-bin-paths` - list executables for the version of the package
* `bin/exec-env` - `echo` a space separated list of "key1=value1 key2=value2" and asdf will set them before running your command
* `bin/uninstall` - uninstalls the specified version
### bin/list-all
Must print a string with a space-seperated list of versions. Example output would be the following: Must print a string with a space-seperated list of versions. Example output would be the following:
@ -21,7 +15,7 @@ Must print a string with a space-seperated list of versions. Example output woul
1.0.1 1.0.2 1.3.0 1.4 1.0.1 1.0.2 1.3.0 1.4
``` ```
### bin/install ##### bin/install
This script should install the package. It will be passed the following command-line args (in order). This script should install the package. It will be passed the following command-line args (in order).
@ -29,12 +23,15 @@ This script should install the package. It will be passed the following command-
* *version* - this is the version or commit sha or the tag name that should be installed (use the first argument to figure out what to do). * *version* - this is the version or commit sha or the tag name that should be installed (use the first argument to figure out what to do).
* *install path* - the dir where the it *should* be installed * *install path* - the dir where the it *should* be installed
If you need to provide any options, use environment variables.
These scripts are run when `list-all`, `install`, `uninstall` or `exec-env` commands are run. You can set or unset env vars and do whatever you need. ### Optional scripts
* `bin/list-bin-paths` - list executables for the version of the package
* `bin/exec-env` - `echo` a space separated list of "key1=value1 key2=value2" and asdf will set them before running your command
* `bin/uninstall` - uninstalls the specified version
### bin/list-bin-paths ##### bin/list-bin-paths
Must print a string with a space-seperated list of dir paths that contain executables. The paths must be relative to the install path passed. Example output would be: Must print a string with a space-seperated list of dir paths that contain executables. The paths must be relative to the install path passed. Example output would be:
@ -44,7 +41,7 @@ bin tools veggies
Shims will be automatically created for each of the binaries/executables. If this script is not specified, asdf will look for the `bin` dir in an installation and create shims for those. Shims will be automatically created for each of the binaries/executables. If this script is not specified, asdf will look for the `bin` dir in an installation and create shims for those.
### bin/exec-env ##### bin/exec-env
Will be passed the following args Will be passed the following args
@ -53,12 +50,6 @@ Will be passed the following args
Must print a string with space-seperated list of env vars to set. Example output would be Must print a string with space-seperated list of env vars to set. Example output would be
### bin/uninstall ##### bin/uninstall
Uninstalls a command. Same args as the `bin/install` script. Uninstalls a specific version of a tool. Same args as the `bin/install` script.
```
FOO=123 BAR=xyz BAZ=example
```
-------------