mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
Move trap to each needed subcommand
This commit is contained in:
@@ -8,10 +8,6 @@ source ./sdata/lib/package-installers.sh
|
|||||||
source ./sdata/lib/dist-determine.sh
|
source ./sdata/lib/dist-determine.sh
|
||||||
|
|
||||||
prevent_sudo_or_root
|
prevent_sudo_or_root
|
||||||
|
|
||||||
# Trap to ensure sudo keepalive is stopped on exit
|
|
||||||
trap sudo_stop_keepalive EXIT INT TERM
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
@@ -77,6 +73,8 @@ case ${SUBCMD_NAME} in
|
|||||||
pause
|
pause
|
||||||
# Initialize sudo keepalive for the entire install process
|
# Initialize sudo keepalive for the entire install process
|
||||||
sudo_init_keepalive
|
sudo_init_keepalive
|
||||||
|
# Set trap to cleanup when this subcommand exits
|
||||||
|
trap sudo_stop_keepalive EXIT INT TERM
|
||||||
if [[ "${SKIP_ALLGREETING}" != true ]]; then
|
if [[ "${SKIP_ALLGREETING}" != true ]]; then
|
||||||
source ${SUBCMD_DIR}/0.greeting.sh
|
source ${SUBCMD_DIR}/0.greeting.sh
|
||||||
fi
|
fi
|
||||||
@@ -97,6 +95,8 @@ case ${SUBCMD_NAME} in
|
|||||||
pause
|
pause
|
||||||
# Initialize sudo keepalive for dependency installation
|
# Initialize sudo keepalive for dependency installation
|
||||||
sudo_init_keepalive
|
sudo_init_keepalive
|
||||||
|
# Set trap to cleanup when this subcommand exits
|
||||||
|
trap sudo_stop_keepalive EXIT INT TERM
|
||||||
if [[ "${SKIP_ALLDEPS}" != true ]]; then
|
if [[ "${SKIP_ALLDEPS}" != true ]]; then
|
||||||
source ${SUBCMD_DIR}/1.deps-router.sh
|
source ${SUBCMD_DIR}/1.deps-router.sh
|
||||||
fi
|
fi
|
||||||
@@ -108,6 +108,8 @@ case ${SUBCMD_NAME} in
|
|||||||
pause
|
pause
|
||||||
# Initialize sudo keepalive for setup steps
|
# Initialize sudo keepalive for setup steps
|
||||||
sudo_init_keepalive
|
sudo_init_keepalive
|
||||||
|
# Set trap to cleanup when this subcommand exits
|
||||||
|
trap sudo_stop_keepalive EXIT INT TERM
|
||||||
if [[ "${SKIP_ALLSETUPS}" != true ]]; then
|
if [[ "${SKIP_ALLSETUPS}" != true ]]; then
|
||||||
source ${SUBCMD_DIR}/2.setups.sh
|
source ${SUBCMD_DIR}/2.setups.sh
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user