aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xkerl14
1 files changed, 13 insertions, 1 deletions
diff --git a/kerl b/kerl
index 6c6cc89..4d3c761 100755
--- a/kerl
+++ b/kerl
@@ -1587,6 +1587,14 @@ get_name_from_install_path()
return 0
}
+get_install_path_from_name()
+{
+ if [ -f "$KERL_BASE_DIR"/otp_installations ]; then
+ grep -m1 -E "$1$" "$KERL_BASE_DIR"/otp_installations | cut -d' ' -f2
+ fi
+ return 0
+}
+
do_active()
{
ACTIVE_PATH="$(get_active_path)"
@@ -2002,7 +2010,11 @@ case "$1" in
;;
installation)
assert_valid_installation "$3"
- maybe_remove "$3"
+ if [ -d "$3" ]; then
+ maybe_remove "$3"
+ else
+ maybe_remove "$(get_install_path_from_name "$3")"
+ fi
escaped="$(echo "$3" | sed $SED_OPT -e 's#/$##' -e 's#\/#\\\/#g')"
list_remove "$2"s "$escaped"
echo "The installation in $3 has been deleted"