From 48dea4676f7d21cdcf2f5b82f16497d0cb82faa1 Mon Sep 17 00:00:00 2001 From: jjorstad2 Date: Sun, 2 Nov 2025 21:30:46 +0000 Subject: [PATCH] Update install_perccli.sh --- install_perccli.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/install_perccli.sh b/install_perccli.sh index 2aac918..bc5d50e 100644 --- a/install_perccli.sh +++ b/install_perccli.sh @@ -58,7 +58,10 @@ if [[ "$PACKAGE_FILE" == *.rpm ]]; then sudo rpm -ivh "$PACKAGE_FILE" INSTALL_SUCCESS=$? else - echo "ERROR: 'rpm' command not found. Please install the package manually." + # FIX: Explicitly setting INSTALL_SUCCESS=1 if the command is not found + echo "ERROR: 'rpm' command not found. This indicates you may be running a Debian-based system (like Ubuntu)." + echo "Please install the 'rpm' package manually, or if you are on Debian/Ubuntu, consider installing 'alien' to convert the package." + INSTALL_SUCCESS=1 fi elif [[ "$PACKAGE_FILE" == *.deb ]]; then echo "Detected DEB package. Trying to install with 'dpkg -i'..." @@ -66,13 +69,17 @@ elif [[ "$PACKAGE_FILE" == *.deb ]]; then sudo dpkg -i "$PACKAGE_FILE" INSTALL_SUCCESS=$? else - echo "ERROR: 'dpkg' command not found. Please install the package manually." + # FIX: Explicitly setting INSTALL_SUCCESS=1 if the command is not found + echo "ERROR: 'dpkg' command not found. Please install the package manager manually." + INSTALL_SUCCESS=1 fi else echo "ERROR: Found file $PACKAGE_FILE is neither .rpm nor .deb. Manual installation is required." + INSTALL_SUCCESS=1 fi # 5. Cleanup and Verification +# The cleanup step now correctly checks the INSTALL_SUCCESS status. if [ $INSTALL_SUCCESS -eq 0 ]; then echo "" echo "5. Installation successful. Cleaning up temporary files." @@ -83,6 +90,7 @@ if [ $INSTALL_SUCCESS -eq 0 ]; then else echo "" echo "5. Installation failed. The archive '$ARCHIVE_NAME' and temporary directory '$TEMP_DIR' are retained for manual debugging." + echo "The package file is located at: $PACKAGE_FILE" fi # ------------------------------------------------------------------------------------------------