aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvax Software <[email protected]>2011-04-01 18:39:31 +0200
committerEvax Software <[email protected]>2011-04-01 18:39:31 +0200
commitdc45417d8896bb10683dfc7d137e3ba394ece438 (patch)
treee93451d7741d607a1942a110c78db7b3aef36ea3
parent33349bb6df3813ae027e91b413b873baf53cf297 (diff)
downloadkerl-dc45417d8896bb10683dfc7d137e3ba394ece438.tar.gz
kerl-dc45417d8896bb10683dfc7d137e3ba394ece438.tar.bz2
kerl-dc45417d8896bb10683dfc7d137e3ba394ece438.zip
Add 'kerl active' command to query the active installation
-rw-r--r--README.md5
-rwxr-xr-xkerl9
2 files changed, 14 insertions, 0 deletions
diff --git a/README.md b/README.md
index 83c8e45..260b61c 100644
--- a/README.md
+++ b/README.md
@@ -78,6 +78,11 @@ You're now ready to work with R14B02:
When your done just type:
$ kerl_deactivate
+Anytime you can check which installation, if any, is currently active with:
+
+ $ kerl active
+ No Erlang/OTP kerl installation is currently active
+
Tuning
======
diff --git a/kerl b/kerl
index 48b96ad..0defcc6 100755
--- a/kerl
+++ b/kerl
@@ -45,6 +45,7 @@ usage() {
echo " install Install the specified release at the given location"
echo " update Update the list of available releases from erlang.org"
echo " list List releases, builds and installations"
+ echo " active Print the path of the active installation"
exit 1
}
@@ -296,6 +297,14 @@ case "$1" in
;;
esac
;;
+ active)
+ if [ -n "$_KERL_SAVED_PATH" ]; then
+ echo "The current active installation is:"
+ echo `echo $PATH | cut -d ":" -f 1 | head -c -4`
+ else
+ echo "No Erlang/OTP kerl installation is currently active"
+ fi
+ ;;
*)
echo "unkwnown command: $1"; usage; exit 1
;;