aboutsummaryrefslogtreecommitdiffstats
path: root/kerl
diff options
context:
space:
mode:
authorRadek Szymczyszyn <[email protected]>2017-08-31 18:16:45 +0200
committerRadek Szymczyszyn <[email protected]>2017-11-03 17:46:43 +0100
commitb6a58f69fad55783c6104bf931af55a121f38b88 (patch)
tree0d2980efa288e58c195472a58af79ea8c8cad647 /kerl
parentd6b407ee43343bb9ad4078b2e81818e47b5f92bd (diff)
downloadkerl-b6a58f69fad55783c6104bf931af55a121f38b88.tar.gz
kerl-b6a58f69fad55783c6104bf931af55a121f38b88.tar.bz2
kerl-b6a58f69fad55783c6104bf931af55a121f38b88.zip
Remove DOCSH_DIR on docsh installation error
Diffstat (limited to 'kerl')
-rwxr-xr-xkerl8
1 files 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