Add signal traps to handle interruptions in install and p scripts
This commit is contained in:
@@ -11,6 +11,8 @@ PURPLE='\033[0;35m'
|
|||||||
CYAN='\033[0;36m'
|
CYAN='\033[0;36m'
|
||||||
NC='\033[0m' # No Color
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
trap "echo -e '${RED}install.sh interrupted.${NC}'; exit 1" SIGINT SIGTERM
|
||||||
|
|
||||||
install_gnome_extension() {
|
install_gnome_extension() {
|
||||||
local uuid="$1"
|
local uuid="$1"
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ pcheck() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
p() (
|
p() (
|
||||||
|
trap "echo -e '\n${RED}p interrupted.${NC}'; exit 1" SIGINT SIGTERM
|
||||||
packageManagers=($(pcheck))
|
packageManagers=($(pcheck))
|
||||||
|
|
||||||
updateP() {
|
updateP() {
|
||||||
|
|||||||
Reference in New Issue
Block a user