From 53d449273a2c731e4c61a0688e18061b554e4a4b Mon Sep 17 00:00:00 2001 From: TrudeEH Date: Thu, 3 Apr 2025 15:16:14 +0100 Subject: [PATCH] Add signal traps to handle interruptions in install and p scripts --- install.sh | 2 ++ scripts/p.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/install.sh b/install.sh index 2d066027..743522e6 100755 --- a/install.sh +++ b/install.sh @@ -11,6 +11,8 @@ PURPLE='\033[0;35m' CYAN='\033[0;36m' NC='\033[0m' # No Color +trap "echo -e '${RED}install.sh interrupted.${NC}'; exit 1" SIGINT SIGTERM + install_gnome_extension() { local uuid="$1" diff --git a/scripts/p.sh b/scripts/p.sh index 8941734b..9889d4bb 100755 --- a/scripts/p.sh +++ b/scripts/p.sh @@ -41,6 +41,7 @@ pcheck() { } p() ( + trap "echo -e '\n${RED}p interrupted.${NC}'; exit 1" SIGINT SIGTERM packageManagers=($(pcheck)) updateP() {