summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel M. Capella <polyzen@archlinux.org>2024-09-18 13:43:20 -0400
committerDaniel M. Capella <polyzen@archlinux.org>2024-09-18 13:50:41 -0400
commit619ba6bda4e471602b03d6928ddd215b1d341bc7 (patch)
treefc197ad3e06917fe5d27672930d7dfecbd21597e
parentfda24bdacb7c23909f0a3375c260f766db4a9c89 (diff)
pacdiff: Minor refactorHEADmaster
Signed-off-by: Daniel M. Capella <polyzen@archlinux.org>
-rw-r--r--src/pacdiff.sh.in12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pacdiff.sh.in b/src/pacdiff.sh.in
index 8a39e1b..21d3b78 100644
--- a/src/pacdiff.sh.in
+++ b/src/pacdiff.sh.in
@@ -276,12 +276,12 @@ else
unset ALL_OFF BOLD BLUE GREEN RED YELLOW
fi
-if ! type -p "${diffprog%% *}" >/dev/null && (( ! OUTPUTONLY )); then
- die "Cannot find the $diffprog binary required for viewing differences."
-fi
-
-if ! type -p "${mergeprog%% *}" >/dev/null && (( ! OUTPUTONLY )); then
- die "Cannot find the $mergeprog binary required for merging differences."
+if (( ! OUTPUTONLY )); then
+ if ! type -p "${diffprog%% *}" >/dev/null; then
+ die "Cannot find the $diffprog binary required for viewing differences."
+ elif ! type -p "${mergeprog%% *}" >/dev/null; then
+ die "Cannot find the $mergeprog binary required for merging differences."
+ fi
fi
case $(( USE_FIND + USE_LOCATE + USE_PACDB )) in