aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rwxr-xr-xkerl6
2 files changed, 7 insertions, 2 deletions
diff --git a/README.md b/README.md
index d8688f5..9562747 100644
--- a/README.md
+++ b/README.md
@@ -175,6 +175,7 @@ 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_DISABLE_AGNER if non-empty will disable agner support
- KERL_AGNER_AUTOINSTALL a list of packages to pre-install
@@ -239,7 +240,7 @@ Install a named build to the specified filesystem location
kerl install <build_name> [path]
-If path is ommited the current working directory will be used
+If path is ommited 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.
*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!
diff --git a/kerl b/kerl
index 56138da..fe8f44a 100755
--- a/kerl
+++ b/kerl
@@ -542,7 +542,11 @@ case "$1" in
if [ $# -eq 3 ]; then
do_install $2 "$3"
else
- do_install $2 .
+ if [ -z "$KERL_DEFAULT_INSTALL_DIR" ]; then
+ do_install $2 .
+ else
+ do_install $2 "$KERL_DEFAULT_INSTALL_DIR/$2"
+ fi
fi
;;
update)