Verified Commit b675c927 authored by Denton Liu via pacman-contrib's avatar Denton Liu via pacman-contrib Committed by Daniel M. Capella
Browse files

pacdiff: Implement die()



In a future commit, we will be making more use of this function. For
now, implement it and use it in the one place where it's applicable.

Signed-off-by: default avatarDenton Liu <liu.denton@gmail.com>
Signed-off-by: Daniel M. Capella's avatarDaniel M. Capella <polyzen@archlinux.org>
parent e092561f
......@@ -34,6 +34,11 @@ declare -i USE_FIND=0 USE_LOCATE=0 USE_PACDB=0 OUTPUTONLY=0
# Import libmakepkg
source "$LIBRARY"/util/message.sh
die() {
error "$@"
exit 1
}
usage() {
cat <<EOF
${myname} v${myver}
......@@ -127,8 +132,7 @@ else
fi
if ! type -p ${diffprog%% *} >/dev/null && (( ! OUTPUTONLY )); then
error "Cannot find the $diffprog binary required for viewing differences."
exit 1
die "Cannot find the $diffprog binary required for viewing differences."
fi
case $(( USE_FIND + USE_LOCATE + USE_PACDB )) in
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment