summaryrefslogtreecommitdiffstats
path: root/scripts/repo-add.sh.in
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2011-03-24 15:10:05 +0100
committerDan McGee <dan@archlinux.org>2011-03-28 03:15:20 +0200
commitc02556e2905dc1801d751db8cc3e96ccbedb76ab (patch)
treea5c31103177257b092cf967c3a0e1da001b70df4 /scripts/repo-add.sh.in
parenta9fb4d9d5b065560f7e42378ad1ee3d2f7b19911 (diff)
downloadpacman-c02556e2905dc1801d751db8cc3e96ccbedb76ab.tar.gz
pacman-c02556e2905dc1801d751db8cc3e96ccbedb76ab.tar.xz
Rely on the return value of type instead of its output
Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/repo-add.sh.in')
-rw-r--r--scripts/repo-add.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 9b57ba76..4447732d 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -193,7 +193,7 @@ create_signature() {
local dbfile="$1"
local ret=0
msg "$(gettext "Signing database...")"
- if [ ! $(type -p "gpg") ]; then
+ if ! type -p gpg; then
error "$(gettext "Cannot find the gpg binary! Is gnupg installed?")"
exit 1 # $E_MISSING_PROGRAM
fi
@@ -211,7 +211,7 @@ verify_signature() {
local dbfile="$1"
local ret=0
msg "$(gettext "Verifying database signature...")"
- if [ ! $(type -p "gpg") ]; then
+ if ! type -p gpg; then
error "$(gettext "Cannot find the gpg binary! Is gnupg installed?")"
exit 1 # $E_MISSING_PROGRAM
fi