Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/repo-add.sh.in
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2011-10-13 17:23:20 +0200
committerDan McGee <dan@archlinux.org>2011-10-13 11:20:12 -0500
commit241946cceaf4c90624794a17c6a13661ea9862a9 (patch)
tree2175dfbc21cf6445c24c49dc8cd31424be4db21c /scripts/repo-add.sh.in
parentd4c97ea2f64cafd3e14e2817d2b805f0b0d541f1 (diff)
scripts/*.sh.in: Fix signal handler error messages
This includes some fixes to the messages that are displayed when a signal is caught in makepkg or repo-add: * Instead of always showing "==> ERROR: TERM signal caught. Exiting...", replace "TERM" by whatever signal is actually caught. * Fix a typo in the SIGERR error message in repo-add ("occurred" instead of "occured"). Francois already fixed this for makepkg in 1e51b81c. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/repo-add.sh.in')
-rw-r--r--scripts/repo-add.sh.in6
1 files changed, 4 insertions, 2 deletions
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