Add signal traps to handle interruptions in install and p scripts

This commit is contained in:
2025-04-03 15:16:14 +01:00
parent 13482d91b4
commit c0b620f606
2 changed files with 3 additions and 0 deletions

View File

@@ -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"

View File

@@ -41,6 +41,7 @@ pcheck() {
}
p() (
trap "echo -e '\n${RED}p interrupted.${NC}'; exit 1" SIGINT SIGTERM
packageManagers=($(pcheck))
updateP() {