From 8d4c232297f083ab39c95e208344024ea8055c1a Mon Sep 17 00:00:00 2001 From: MiguelNdeCarvalho Date: Fri, 13 May 2022 16:25:30 +0100 Subject: [PATCH 1/2] scripts: install: Purge installed directories --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index c9388d4..67a961f 100755 --- a/scripts/install +++ b/scripts/install @@ -59,6 +59,7 @@ check_preexisting_install () { read -r -p "Do you want to replace it? [y/N] " response case "$response" in [yY]) + rm -rf "$INSTALL_DIR" "$BIN_FILE" ;; *) echo "Aborting installation." From a0d56711225ad6653ea32a977ff18ec97e47fc4c Mon Sep 17 00:00:00 2001 From: MiguelNdeCarvalho Date: Fri, 13 May 2022 16:26:29 +0100 Subject: [PATCH 2/2] scripts: install: Remove exit when createing directories --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 67a961f..ed38b0e 100755 --- a/scripts/install +++ b/scripts/install @@ -71,11 +71,11 @@ check_preexisting_install () { install () { # Copy distribution files to the installation directory - mkdir -p "$INSTALL_DIR" || exit 1 + mkdir -p "$INSTALL_DIR" cp -a "$INSTALLER_DIST_DIR" "$INSTALL_DIR" || exit 1 # Copy binaries to user's bin directory - mkdir -p "$BINS_DIR" || exit 1 + mkdir -p "$BINS_DIR" ln -s "$INSTALL_DIR/terrabutler" "$BIN_FILE" || exit 1 printf "Install has finished successfully.\nYou may now use '%s' command.\n" "$BIN_FILE"