[pacman-dev] [PATCH 5/7] pacman-key: hide output of executed commands on logic checks
ivan.kanak at gmail.com
ivan.kanak at gmail.com
Thu Apr 21 09:59:09 EDT 2011
From: Ivan Kanakarakis <ivan.kanak at gmail.com>
This commit correctly redirects to /dev/null the output of several
commands that get executed on logic checks.
Signed-off-by: Ivan Kanakarakis <ivan.kanak at gmail.com>
---
scripts/pacman-key.sh.in | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in
index 7b9c853..b5fca2b 100644
--- a/scripts/pacman-key.sh.in
+++ b/scripts/pacman-key.sh.in
@@ -116,7 +116,7 @@ reload_keyring() {
# Verify signatures of related files, if they exist
if [[ -r "${ADDED_KEYS}" ]]; then
msg "$(gettext "Verifying official keys file signature...")"
- if ! ${GPG_PACMAN} --quiet --batch --verify "${ADDED_KEYS}.sig" 1>/dev/null; then
+ if ! ${GPG_PACMAN} --verify "${ADDED_KEYS}.sig" &>/dev/null; then
error "$(gettext "The signature of file %s is not valid.")" "${ADDED_KEYS}"
exit 1
fi
@@ -124,7 +124,7 @@ reload_keyring() {
if [[ -r "${DEPRECATED_KEYS}" ]]; then
msg "$(gettext "Verifying deprecated keys file signature...")"
- if ! ${GPG_PACMAN} --quiet --batch --verify "${DEPRECATED_KEYS}.sig" 1>/dev/null; then
+ if ! ${GPG_PACMAN} --verify "${DEPRECATED_KEYS}.sig" &>/dev/null; then
error "$(gettext "The signature of file %s is not valid.")" "${DEPRECATED_KEYS}"
exit 1
fi
@@ -132,7 +132,7 @@ reload_keyring() {
if [[ -r "${REMOVED_KEYS}" ]]; then
msg "$(gettext "Verifying deleted keys file signature...")"
- if ! ${GPG_PACMAN} --quiet --batch --verify "${REMOVED_KEYS}.sig"; then
+ if ! ${GPG_PACMAN} --verify "${REMOVED_KEYS}.sig" &>/dev/null; then
error "$(gettext "The signature of file %s is not valid.")" "${REMOVED_KEYS}"
exit 1
fi
@@ -218,7 +218,7 @@ if ! type gettext &>/dev/null; then
fi
if [[ $1 != "--version" && $1 != "-V" && $1 != "--help" && $1 != "-h" && $1 != "" ]]; then
- if type -p gpg >/dev/null 2>&1 = 1; then
+ if ! type -p gpg &>/dev/null; then
error "$(gettext "gnupg does not seem to be installed.")"
msg2 "$(gettext "pacman-key requires gnupg for most operations.")"
exit 1
@@ -306,7 +306,7 @@ case "${command}" in
fi
while (( $# > 0 )); do
# Verify if the key exists in pacman's keyring
- if ${GPG_PACMAN} --list-keys "$1" > /dev/null 2>&1; then
+ if ${GPG_PACMAN} --list-keys "$1" &>/dev/null; then
${GPG_PACMAN} --edit-key "$1"
else
error "$(gettext "The key identified by %s doesn't exist")" "$1"
--
1.7.4.4
More information about the pacman-dev
mailing list