summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in4
-rw-r--r--scripts/repo-add.sh.in4
2 files changed, 4 insertions, 4 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 93cf5662..f6bbe90c 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -392,7 +392,7 @@ run_pacman() {
local cmd
printf -v cmd "%q " "$PACMAN" $PACMAN_OPTS "$@"
if (( ! ASROOT )) && [[ ! $1 =~ ^-(T|Qq)$ ]]; then
- if [ "$(type -p sudo)" ]; then
+ if type -p sudo >/dev/null; then
cmd="sudo $cmd"
else
cmd="su -c '$cmd'"
@@ -1112,7 +1112,7 @@ create_signature() {
local ret=0
local filename="$1"
msg "$(gettext "Signing package...")"
- if [ ! $(type -p "gpg") ]; then
+ if ! type -p gpg >/dev/null; then
error "$(gettext "Cannot find the gpg binary! Is gnupg installed?")"
exit 1 # $E_MISSING_PROGRAM
fi
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