mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
Cleanup docs a bit
This commit is contained in:
parent
52ce0afcf4
commit
ec29a48342
@ -1,19 +1,13 @@
|
||||
## 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/install` - installs the specified version
|
||||
|
||||
|
||||
##### 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
|
||||
##### bin/list-all
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
### bin/install
|
||||
##### bin/install
|
||||
|
||||
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).
|
||||
* *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:
|
||||
|
||||
@ -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.
|
||||
|
||||
### bin/exec-env
|
||||
##### bin/exec-env
|
||||
|
||||
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
|
||||
|
||||
### bin/uninstall
|
||||
##### bin/uninstall
|
||||
|
||||
Uninstalls a command. Same args as the `bin/install` script.
|
||||
|
||||
```
|
||||
FOO=123 BAR=xyz BAZ=example
|
||||
```
|
||||
|
||||
-------------
|
||||
Uninstalls a specific version of a tool. Same args as the `bin/install` script.
|
||||
|
Loading…
Reference in New Issue
Block a user