From b535de39968b06696df758e9888319fda36417e1 Mon Sep 17 00:00:00 2001 From: jjorstad2 Date: Sun, 2 Nov 2025 21:52:49 +0000 Subject: [PATCH] Update install_perccli.sh --- install_perccli.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/install_perccli.sh b/install_perccli.sh index a577b42..30d5195 100644 --- a/install_perccli.sh +++ b/install_perccli.sh @@ -15,6 +15,17 @@ SYMLINK_PATH="/usr/local/bin/perccli" echo "Starting PERCCLI installation script..." echo "Target URL: $PERCCLI_URL" +# --- Clean Start Logic: Remove previous temporary files/directories if they exist --- +if [ -d "$TEMP_DIR" ]; then + echo "Found old temporary directory '$TEMP_DIR'. Removing for a clean start." + rm -rf "$TEMP_DIR" +fi +if [ -f "$ARCHIVE_NAME" ]; then + echo "Found old archive '$ARCHIVE_NAME'. Removing for a clean start." + rm -f "$ARCHIVE_NAME" +fi +# ---------------------------------------------------------------------------------- + # 1. Download the archive echo "1. Downloading $ARCHIVE_NAME..." # Using wget with User-Agent to prevent 403 errors