Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2011-03-24 10:10:05 -0400
committerDan McGee <dan@archlinux.org>2011-03-27 20:15:20 -0500
commitc02556e2905dc1801d751db8cc3e96ccbedb76ab (patch)
treea5c31103177257b092cf967c3a0e1da001b70df4 /scripts/makepkg.sh.in
parenta9fb4d9d5b065560f7e42378ad1ee3d2f7b19911 (diff)
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/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in4
1 files changed, 2 insertions, 2 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