From b6a58f69fad55783c6104bf931af55a121f38b88 Mon Sep 17 00:00:00 2001 From: Radek Szymczyszyn Date: Thu, 31 Aug 2017 18:16:45 +0200 Subject: Remove DOCSH_DIR on docsh installation error --- kerl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kerl b/kerl index 8d60f1b..efe86a2 100755 --- a/kerl +++ b/kerl @@ -1125,21 +1125,21 @@ install_docsh() { fi if [ $? -ne 0 ]; then echo "Couldn't checkout specified version" - : rm -Rf "$DOCSH_DIR" + rm -Rf "$DOCSH_DIR" exit 1 fi ./rebar3 compile if [ $? -ne 0 ]; then echo "Couldn't compile docsh" - : rm -Rf "$DOCSH_DIR" + rm -Rf "$DOCSH_DIR" exit 1 fi ## Install $HOME/.erlang if [ -f $HOME/.erlang ]; then echo "Couldn't install $HOME/.erlang - the file already exists" - : rm -Rf "$DOCSH_DIR" + rm -Rf "$DOCSH_DIR" exit 1 else cat $DOCSH_DIR/templates/dot.erlang > $HOME/.erlang @@ -1147,7 +1147,7 @@ install_docsh() { ## Install docsh user_default if [ -f $DOCSH_DIR/user_default.beam ]; then echo "Couldn't install $DOCSH_DIR/user_default.beam - the file already exists" - : rm -Rf "$DOCSH_DIR" + rm -Rf "$DOCSH_DIR" exit 1 else erlc -I $DOCSH_DIR/include -o $DOCSH_DIR/ ~/work/erszcz/docsh/templates/user_default.erl -- cgit v1.2.3