summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvangelos Foutras <evangelos@foutrelis.com>2014-12-19 19:03:22 +0100
committerAllan McRae <allan@archlinux.org>2014-12-24 02:19:28 +0100
commitc9ca3634317d11623ed017c214dc1000dc846a23 (patch)
tree7fc3925307a5d8d79bdcc2537ca0a52cdff987d9
parent863cfb5808c618d3cda54aa3dd73e721855049d4 (diff)
downloadpacman-c9ca3634317d11623ed017c214dc1000dc846a23.tar.gz
pacman-c9ca3634317d11623ed017c214dc1000dc846a23.tar.xz
checkupdates: show error when fakeroot is missing
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--contrib/checkupdates.sh.in8
1 files changed, 8 insertions, 0 deletions
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