From 1eee23ce8663c2cf2bcb338d6a3cff37cb0575f9 Mon Sep 17 00:00:00 2001
From: Orestis <orestis.malaspinas@pm.me>
Date: Thu, 29 Feb 2024 16:28:39 +0100
Subject: [PATCH] simplify

---
 installer.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/installer.sh b/installer.sh
index 0ad51c6..a012d2b 100644
--- a/installer.sh
+++ b/installer.sh
@@ -6,8 +6,12 @@
 { \unalias command; \unset -f command; } >/dev/null 2>&1
 tdir=''
 gitedu_release_url="https://gitedu.hesge.ch/dojo_project/projects/ui/dojocli/-/releases/Latest"
-cleanup() {
+cleanup_success() {
     printf "The dojo is installed in %s\nMake sure %s is in your path\n" "$dest" "$dest"
+    cleanup
+}
+
+cleanup() {
     [ -n "$tdir" ] && {
         printf "Cleaning temporary files in %s\n" "$tdir"
         command rm -rf "$tdir"
@@ -182,7 +186,7 @@ main() {
     else
         linux_install
     fi
-    cleanup
+    cleanup_success
     exit 0
 }
 
-- 
GitLab