From c9ca3634317d11623ed017c214dc1000dc846a23 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Fri, 19 Dec 2014 20:03:22 +0200 Subject: checkupdates: show error when fakeroot is missing Signed-off-by: Allan McRae --- contrib/checkupdates.sh.in | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'contrib') diff --git a/contrib/checkupdates.sh.in b/contrib/checkupdates.sh.in index f4f36c09..a3a308b0 100644 --- a/contrib/checkupdates.sh.in +++ b/contrib/checkupdates.sh.in @@ -21,6 +21,9 @@ declare -r myname='checkupdates' declare -r myver='@PACKAGE_VERSION@' +m4_include(../scripts/library/output_format.sh) +m4_include(../scripts/library/term_colors.sh) + if (( $# > 0 )); then echo "${myname} (pacman) v${myver}" echo @@ -32,6 +35,11 @@ if (( $# > 0 )); then exit 0 fi +if ! type -P fakeroot >/dev/null; then + error 'Cannot find the fakeroot binary.' + exit 1 +fi + if [[ -z $CHECKUPDATES_DB ]]; then CHECKUPDATES_DB="${TMPDIR:-/tmp}/checkup-db-${USER}/" fi -- cgit v1.2.3-70-g09d2