From 9554736ff7e303acec5083d579804919a81495ea Mon Sep 17 00:00:00 2001 From: Thiago Scalone <155578946+scalone-cw@users.noreply.github.com> Date: Thu, 25 Aug 2011 02:34:27 -0700 Subject: [PATCH 1/4] add default install path --- kerl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kerl b/kerl index 6aa9eda..c2599f4 100755 --- a/kerl +++ b/kerl @@ -27,6 +27,7 @@ KERL_BASE_DIR="$HOME/.kerl" KERL_CONFIG="$HOME/.kerlrc" KERL_DOWNLOAD_DIR="$KERL_BASE_DIR/archives" KERL_BUILD_DIR="$KERL_BASE_DIR/builds" +KERL_DEFAULT_INSTALL_DIR="$KERL_BASE_DIR/installs" if [ -n "$KERL_CONFIGURE_OPTIONS" ]; then _KCO="$KERL_CONFIGURE_OPTIONS" fi @@ -529,7 +530,7 @@ case "$1" in if [ $# -eq 3 ]; then do_install $2 "$3" else - do_install $2 . + do_install $2 "$KERL_DEFAULT_INSTALL_DIR/$2" fi ;; update) From bdf0f64db6fcd580bfdd0c69af0632759def50f0 Mon Sep 17 00:00:00 2001 From: Thiago Scalone <155578946+scalone-cw@users.noreply.github.com> Date: Thu, 25 Aug 2011 21:19:08 -0700 Subject: [PATCH 2/4] update kerl install documentation on README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index eb69397..57e2212 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 where to install builds to if no path is provided, defaults to $HOME/.kerl/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 @@ -238,7 +239,7 @@ Install a named build to the specified filesystem location kerl install [path] -If path is ommited the current working directory will be used +If path is ommited KERL_DEFAULT_INSTALL_DIR/ will be used *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! From a49a9b69bc59ffe5014bc1a416ffaa893e5cb6cb Mon Sep 17 00:00:00 2001 From: Thiago Scalone <155578946+scalone-cw@users.noreply.github.com> Date: Tue, 30 Aug 2011 02:26:17 -0700 Subject: [PATCH 3/4] use KERL_DEFAULT_INSTALL_DIR/ if defined in dotkerlrc --- kerl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kerl b/kerl index c2599f4..9e33e89 100755 --- a/kerl +++ b/kerl @@ -27,7 +27,6 @@ KERL_BASE_DIR="$HOME/.kerl" KERL_CONFIG="$HOME/.kerlrc" KERL_DOWNLOAD_DIR="$KERL_BASE_DIR/archives" KERL_BUILD_DIR="$KERL_BASE_DIR/builds" -KERL_DEFAULT_INSTALL_DIR="$KERL_BASE_DIR/installs" if [ -n "$KERL_CONFIGURE_OPTIONS" ]; then _KCO="$KERL_CONFIGURE_OPTIONS" fi @@ -530,7 +529,11 @@ case "$1" in if [ $# -eq 3 ]; then do_install $2 "$3" else - do_install $2 "$KERL_DEFAULT_INSTALL_DIR/$2" + if [ -z "$KERL_DEFAULT_INSTALL_DIR" ]; then + do_install $2 . + else + do_install $2 "$KERL_DEFAULT_INSTALL_DIR/$2" + fi fi ;; update) From f04b9d7fa193ea0c8446ec32606f4e5a7ee08c3d Mon Sep 17 00:00:00 2001 From: Thiago Scalone <155578946+scalone-cw@users.noreply.github.com> Date: Tue, 30 Aug 2011 02:32:55 -0700 Subject: [PATCH 4/4] update documentation on readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 57e2212..0193647 100644 --- a/README.md +++ b/README.md @@ -175,7 +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 where to install builds to if no path is provided, defaults to $HOME/.kerl/installs +- 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 +239,7 @@ Install a named build to the specified filesystem location kerl install [path] -If path is ommited KERL_DEFAULT_INSTALL_DIR/ 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/ 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!