From c02556e2905dc1801d751db8cc3e96ccbedb76ab Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Thu, 24 Mar 2011 10:10:05 -0400 Subject: Rely on the return value of type instead of its output Signed-off-by: Dave Reisner Signed-off-by: Dan McGee --- scripts/repo-add.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/repo-add.sh.in') 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 -- cgit v1.2.3-24-g4f1b