summaryrefslogtreecommitdiff
path: root/contrib/checkupdates.sh.in
diff options
context:
space:
mode:
authorEvangelos Foutras <evangelos@foutrelis.com>2014-12-19 20:03:22 +0200
committerAllan McRae <allan@archlinux.org>2014-12-24 11:19:28 +1000
commitc9ca3634317d11623ed017c214dc1000dc846a23 (patch)
tree7fc3925307a5d8d79bdcc2537ca0a52cdff987d9 /contrib/checkupdates.sh.in
parent863cfb5808c618d3cda54aa3dd73e721855049d4 (diff)
downloadpacman-c9ca3634317d11623ed017c214dc1000dc846a23.tar.xz
checkupdates: show error when fakeroot is missing
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'contrib/checkupdates.sh.in')
-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