diff options
author | Pierre Fenoll <[email protected]> | 2016-01-10 14:40:04 +0100 |
---|---|---|
committer | Pierre Fenoll <[email protected]> | 2016-01-10 14:40:04 +0100 |
commit | f42274e2a664d4a1f5c328405d99aec356007225 (patch) | |
tree | d522d0a00aca72697dae01e7dbdf1f100881fc79 | |
parent | 4e7c4349ddcd46ac11cd4cd50bfbda25f1f11ca2 (diff) | |
download | kerl-f42274e2a664d4a1f5c328405d99aec356007225.tar.gz kerl-f42274e2a664d4a1f5c328405d99aec356007225.tar.bz2 kerl-f42274e2a664d4a1f5c328405d99aec356007225.zip |
Update README.md
-rw-r--r-- | README.md | 161 |
1 files changed, 72 insertions, 89 deletions
@@ -3,7 +3,7 @@ kerl Easy building and installing of [Erlang/OTP](http://www.erlang.org) instances -Kerl aims to be shell agnostic and its only dependencies, excluding what's required to actually build Erlang/OTP, are curl and git. +Kerl aims to be shell agnostic and its only dependencies, excluding what's required to actually build Erlang/OTP, are `curl` and `git`. All is done so that, once a specific release has been built, creating a new installation is as fast as possible. @@ -64,7 +64,7 @@ Note that named builds allow you to have different builds for the same Erlang/OT Building Erlang/OTP R14B02 (r14b02_hipe), please wait... Erlang/OTP R14B02 (r14b02_hipe) has been successfully built -(Note that kerl uses the otp_build script internally, and './otp_build configure' disables HiPE on linux) +(Note that kerl uses the otp_build script internally, and `./otp_build configure` disables HiPE on linux) You can verify your build has been registered: @@ -90,14 +90,15 @@ And at last activate it: $ . /path/to/install/dir/activate -Activation will backup your $PATH, prepend it with the installation's bin/ directory. Thus it's only valid for the current shell session, and until you activate another installation or call kerl_deactivate. +Activation will backup your $PATH, prepend it with the installation's bin/ directory. Thus it's only valid for the current shell session, and until you activate another installation or call `kerl_deactivate`. You're now ready to work with your r14b02 installation: $ erl -version Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 5.8.3 -When you're done just type: +When you're done just call the shell function: + $ kerl_deactivate Anytime you can check which installation, if any, is currently active with: @@ -123,21 +124,19 @@ You can delete builds and installations with the following commands: $ kerl delete build r14b02 The r14b02 build has been deleted - $ kerl delete installation /path/to/install/dir The installation in /path/to/install/dir has been deleted -You can easily deploy an installation to another host having ssh and rsync access with the following command: +You can easily deploy an installation to another host having `ssh` and `rsync` access with the following command: $ kerl deploy anotherhost /path/to/install/dir - Cloning Erlang/OTP r14b02 (/path/to/install/dir) to anotherhost (/path/to/install/dir) ... On anotherhost, you can activate this installation running the following command: . /path/to/install/dir/activate Later on, you can leave the installation typing: kerl_deactivate -As an experimental feature, you can build Erlang directly from a git repository with a command of the form "kerl build git <git_url> <git_version> <build_name>" where <git_version> can be either a branch, a tag or a commit id as it will be passed to "git checkout": +As an experimental feature, you can build Erlang directly from a git repository with a command of the form `kerl build git <git_url> <git_version> <build_name>` where <git_version> can be either a branch, a tag or a commit id as it will be passed to `git checkout`: $ kerl build git https://github.com/erlang/otp.git dev r14b02_dev Checking Erlang/OTP git repositoy from https://github.com/erlang/otp.git... @@ -151,24 +150,24 @@ You can tune kerl using the .kerlrc file in your $HOME directory. You can set the following variables: -- KERL_DOWNLOAD_DIR where to put downloaded files, defaults to $HOME/.kerl/archives -- KERL_BUILD_DIR where to hold the builds, defaults to $HOME/.kerl/builds -- KERL_DEFAULT_INSTALL_DIR if set in ~/.kerlrc, install builds to this dir if no path is provided on installs, (recommend "$KERL_BASE_DIR/installs") -- KERL_CONFIGURE_OPTIONS options to pass to Erlang's ./configure script, e.g. --without-termcap -- KERL_CONFIGURE_APPLICATIONS if non-empty, subset of applications used in the builds (and subsequent installations) process, e.g. "kernel stdlib sasl" -- KERL_CONFIGURE_DISABLE_APPLICATIONS if non-empty, subset of applications disabled in the builds (and subsequent installations) process, e.g. "odbc" -- KERL_SASL_STARTUP use SASL system startup instead of minimal -- KERL_USE_AUTOCONF use autoconf in the builds process -- KERL_INSTALL_MANPAGES if non-empty will install manpages -- KERL_INSTALL_HTMLDOCS if non-empty will install HTML docs -- KERL_DEPLOY_SSH_OPTIONS if additional options are required, e.g. "-qx -o PasswordAuthentication=no" -- KERL_DEPLOY_RSYNC_OPTIONS if additional options are required, e.g. "--delete" -- KERL_ENABLE_PROMPT if set, the prompt will be prefixed with the name of the active build +- `KERL_DOWNLOAD_DIR` where to put downloaded files, defaults to $HOME/.kerl/archives +- `KERL_BUILD_DIR` where to hold the builds, defaults to $HOME/.kerl/builds +- `KERL_DEFAULT_INSTALL_DIR` if set in ~/.kerlrc, install builds to this dir if no path is provided on installs, (recommend `$KERL_BASE_DIR/installs`) +- `KERL_CONFIGURE_OPTIONS` options to pass to Erlang's `./configure` script, e.g. `--without-termcap` +- `KERL_CONFIGURE_APPLICATIONS` if non-empty, subset of applications used in the builds (and subsequent installations) process, e.g. `kernel stdlib sasl` +- `KERL_CONFIGURE_DISABLE_APPLICATIONS` if non-empty, subset of applications disabled in the builds (and subsequent installations) process, e.g. `odbc` +- `KERL_SASL_STARTUP` use SASL system startup instead of minimal +- `KERL_USE_AUTOCONF` use autoconf in the builds process +- `KERL_INSTALL_MANPAGES` if non-empty will install manpages +- `KERL_INSTALL_HTMLDOCS` if non-empty will install HTML docs +- `KERL_DEPLOY_SSH_OPTIONS` if additional options are required, e.g. `-qx -o PasswordAuthentication=no` +- `KERL_DEPLOY_RSYNC_OPTIONS` if additional options are required, e.g. `--delete` +- `KERL_ENABLE_PROMPT` if set, the prompt will be prefixed with the name of the active build Note on .kerlrc =============== -Since .kerlrc is a dot file for /bin/sh, running shell commands inside the .kerlrc will affect the shell and environment variables for the commands being executed later. For example, the shell `export` commands in .kerlrc will affect *your login shell environment* when activating curl. Use with care. +Since .kerlrc is a dot file for `/bin/sh`, running shell commands inside the .kerlrc will affect the shell and environment variables for the commands being executed later. For example, the shell `export` commands in .kerlrc will affect *your login shell environment* when activating `curl`. Use with care. Glossary ======== @@ -187,47 +186,43 @@ Commands reference build ----- -Create a named build either from an official Erlang/OTP release or from a git repository - -### Syntax - kerl build <release_code> <build_name> kerl build git <git_url> <git_version> <build_name> -### Examples +Creates a named build either from an official Erlang/OTP release or from a git repository. $ kerl build R14B02 r14b02 $ kerl build git https://github.com/erlang/otp dev r14b02_dev -### Tuning +#### Tuning -#### Configure options +##### Configure options -You can specify the configure options to use when building Erlang/OTP with the KERL_CONFIGURE_OPTIONS variable, either in your $HOME/.kerlrc file or prepending it to the command line. +You can specify the configure options to use when building Erlang/OTP with the `KERL_CONFIGURE_OPTIONS` variable, either in your $HOME/.kerlrc file or prepending it to the command line. $ KERL_CONFIGURE_OPTIONS=--enable-hipe kerl build R14B02 r14b02_hipe -#### Configure applications +##### Configure applications -If non-empty, you can specify the subset of applications to use when building (and subsequent installing) Erlang/OTP with the KERL_CONFIGURE_APPLICATIONS variable, either in your $HOME/.kerlrc file or prepending it to the command line. +If non-empty, you can specify the subset of applications to use when building (and subsequent installing) Erlang/OTP with the `KERL_CONFIGURE_APPLICATIONS` variable, either in your $HOME/.kerlrc file or prepending it to the command line. $ KERL_CONFIGURE_APPLICATIONS="kernel stdlib sasl" kerl build R15B01 r15b01_minimal -#### Configure disable applications +##### Configure disable applications -If non-empty, you can specify the subset of applications to disable when building (and subsequent installing) Erlang/OTP with the KERL_CONFIGURE_DISABLE_APPLICATIONS variable, either in your $HOME/.kerlrc file or prepending it to the command line. +If non-empty, you can specify the subset of applications to disable when building (and subsequent installing) Erlang/OTP with the `KERL_CONFIGURE_DISABLE_APPLICATIONS` variable, either in your $HOME/.kerlrc file or prepending it to the command line. $ KERL_CONFIGURE_DISABLE_APPLICATIONS="odbc" kerl build R16B02 r16b02_no_odbc -#### Enable autoconf +##### Enable autoconf -You can enable the use of autoconf in the build process setting KERL_USE_AUTOCONF=yes in your $HOME/.kerlrc file +You can enable the use of `autoconf` in the build process setting `KERL_USE_AUTOCONF=yes` in your $HOME/.kerlrc file -*Note*: autoconf is always enabled for git builds +*Note*: `autoconf` is always enabled for git builds -#### Using shell export command in .kerlrc +##### Using shell export command in .kerlrc -Configure variables which includes spaces such as those in CFLAGS cannot be passed on with KERL_CONFIGURE_OPTIONS. In such a case you can use shell `export` command to define the environment variables for Configure. Note well: this method has a side effect to change your shell execution environment after activating a kerl installation of Erlang/OTP. Here is an example of .kerlrc for building Erlang/OTP for FreeBSD with clang compiler: +Configure variables which includes spaces such as those in `CFLAGS` cannot be passed on with `KERL_CONFIGURE_OPTIONS`. In such a case you can use shell `export` command to define the environment variables for `./configure`. Note well: this method has a side effect to change your shell execution environment after activating a kerl installation of Erlang/OTP. Here is an example of .kerlrc for building Erlang/OTP for FreeBSD with clang compiler: # for clang export CC=clang CXX=clang CFLAGS="-g -O3 -fstack-protector" LDFLAGS="-fstack-protector" @@ -237,108 +232,97 @@ Configure variables which includes spaces such as those in CFLAGS cannot be pass install ------- -Install a named build to the specified filesystem location - -### Syntax - kerl install <build_name> [path] -If path is omitted the current working directory will be used. However, if KERL_DEFAULT_INSTALL_DIR is defined in ~/.kerlrc, KERL_DEFAULT_INSTALL_DIR/<build-name> will be used instead. +Installs a named build to the specified filesystem location. -*Note*: kerl assumes the specified directory is for its sole use. If you later delete it with the kerl delete command, the whole directory will be deleted, along with anything you may have added to it! + $ kerl install r14b02 /srv/otp/r14b02 -### Example +If path is omitted the current working directory will be used. However, if `KERL_DEFAULT_INSTALL_DIR` is defined in ~/.kerlrc, `KERL_DEFAULT_INSTALL_DIR/<build-name>` will be used instead. - $ kerl install r14b02 /srv/otp/r14b02 +*Note*: kerl assumes the specified directory is for its sole use. If you later delete it with the kerl delete command, the whole directory will be deleted, along with anything you may have added to it! -### Tuning +#### Tuning -#### SASL startup +##### SASL startup -You can have SASL started automatically setting KERL_SASL_STARTUP=yes in your $HOME/.kerlrc file or prepending it to the command line +You can have SASL started automatically setting `KERL_SASL_STARTUP=yes` in your $HOME/.kerlrc file or prepending it to the command line. -#### Manpages installation +##### Manpages installation -You can have manpages installed automatically setting KERL_INSTALL_MANPAGES=yes in your $HOME/.kerlrc file or prepending it to the command line +You can have manpages installed automatically setting `KERL_INSTALL_MANPAGES=yes` in your $HOME/.kerlrc file or prepending it to the command line. *Note*: for git-based builds, kerl downloads and installs the newest official manpages which may or may not correspond to the contents of your local build. -#### HTML docs installation +##### HTML docs installation -You can have HTML docs installed automatically setting KERL_INSTALL_HTMLDOCS=yes in your $HOME/.kerlrc file or prepending it to the command line +You can have HTML docs installed automatically setting `KERL_INSTALL_HTMLDOCS=yes` in your $HOME/.kerlrc file or prepending it to the command line. *Note*: for git-based builds, kerl downloads and installs the newest official HTML docs which may or may not correspond to the contents of your local build. deploy ------ -Deploy the specified installation to the given host and location + kerl deploy <[user@]host> [directory] [remote_directory] -### Syntax +Deploys the specified installation to the given host and location. - kerl deploy <[user@]host> [directory] [remote_directory] + $ kerl deploy anotherhost /path/to/install/dir If remote_directory is omitted the specified directory will be used. If directory and remote_directory is omitted the current working directory will be used. -*NOTE*: kerl assumes the specified host is accessible via ssh and rsync. +*NOTE*: kerl assumes the specified host is accessible via `ssh` and `rsync`. -### Example +#### Tuning - $ kerl deploy anotherhost /path/to/install/dir +##### Additional SSH options -### Tuning +You can have additional options given to `ssh` by setting them in the `KERL_DEPLOY_SSH_OPTIONS` variable in your $HOME/.kerlrc file or on the command line, e.g. `KERL_DEPLOY_SSH_OPTIONS='-qx -o PasswordAuthentication=no'`. -#### Additional SSH options +##### Additional RSYNC options -You can have additional options given to SSH by setting them in the KERL_DEPLOY_SSH_OPTIONS variable in your $HOME/.kerlrc file or on the command line, e.g. KERL_DEPLOY_SSH_OPTIONS="-qx -o PasswordAuthentication=no" - -#### Additional RSYNC options - -You can have additional options given to RSYNC by setting them in the KERL_DEPLOY_RSYNC_OPTIONS variable in your $HOME/.kerlrc file or on the command line, e.g. KERL_DEPLOY_RSYNC_OPTIONS="--delete" +You can have additional options given to `rsync` by setting them in the `KERL_DEPLOY_RSYNC_OPTIONS` variable in your $HOME/.kerlrc file or on the command line, e.g. `KERL_DEPLOY_RSYNC_OPTIONS='--delete'`. update ------ -Update the list of releases - -### Syntax - kerl update releases +Fetches the up-to-date list of OTP releases from erlang.org. + list ---- -List the releases, builds or installations available - -### Syntax - kerl list <releases|builds|installations> +Lists the releases, builds or installations available. + delete ------ -Delete the specified build or installation - -### Syntax - kerl delete build <build_name> kerl delete installation <path> -### Examples +Deletes the specified build or installation. - $ kerl delete build r14b02 - The r14b02 build has been deleted - $ kerl delete installation /srv/otp/r14b02 - The installation in /srv/otp/r14b02 has been deleted +``` +$ kerl delete build r14b02 +The r14b02 build has been deleted +``` + +``` +$ kerl delete installation /srv/otp/r14b02 +The installation in /srv/otp/r14b02 has been deleted +``` active ------ -Print the path of the currently active installation, if any + kerl active -### Example +Prints the path of the currently active installation, if any. $ kerl active The current active installation is: @@ -347,9 +331,9 @@ Print the path of the currently active installation, if any status ------ -Print the available builds and installations as well as the currently active installation + kerl status -### Example +Prints the available builds and installations as well as the currently active installation. $ kerl status Available builds: @@ -361,4 +345,3 @@ Print the available builds and installations as well as the currently active ins r14b02 /srv/otp/r14b02_dev ---------- No Erlang/OTP kerl installation is currently active - |