From dc45417d8896bb10683dfc7d137e3ba394ece438 Mon Sep 17 00:00:00 2001 From: Evax Software Date: Fri, 1 Apr 2011 18:39:31 +0200 Subject: Add 'kerl active' command to query the active installation --- kerl | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'kerl') 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 ;; -- cgit v1.2.3