diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/makepkg.sh.in | 4 | ||||
-rw-r--r-- | scripts/repo-add.sh.in | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 50cf2725..09c1e963 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -179,7 +179,9 @@ clean_up() { ## set -E trap 'clean_up' 0 -trap 'trap_exit "$(gettext "TERM signal caught. Exiting...")"' TERM HUP QUIT +for signal in TERM HUP QUIT; do + trap "trap_exit \"$(gettext "%s signal caught. Exiting...")\" \"$signal\"" "$signal" +done trap 'trap_exit "$(gettext "Aborted by user! Exiting...")"' INT trap 'trap_exit "$(gettext "An unknown error has occurred. Exiting...")"' ERR diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index d147b875..5e1d7702 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -572,9 +572,11 @@ tmpdir=$(mktemp -d /tmp/repo-tools.XXXXXXXXXX) || (\ mkdir $tmpdir/tree trap 'clean_up' EXIT -trap 'trap_exit "$(gettext "TERM signal caught. Exiting...")"' TERM HUP QUIT +for signal in TERM HUP QUIT; do + trap "trap_exit \"$(gettext "%s signal caught. Exiting...")\" \"$signal\"" "$signal" +done trap 'trap_exit "$(gettext "Aborted by user! Exiting...")"' INT -trap 'trap_exit "$(gettext "An unknown error has occured. Exiting...")"' ERR +trap 'trap_exit "$(gettext "An unknown error has occurred. Exiting...")"' ERR declare -a args success=0 |