From 0b40f415c807e54a828594f0406c9f3617a54246 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 1 Apr 2016 15:44:28 +0200 Subject: Handle situations where the 'bc' command line calculator is not installed. --- bin/impressive-display | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/impressive-display b/bin/impressive-display index 08d9da1..c289e2d 100755 --- a/bin/impressive-display +++ b/bin/impressive-display @@ -184,6 +184,11 @@ function cleanup { function pdf_is_portrait { + if ! which bc 1>/dev/null; then + echo "WARNING: The 'bc' command line tool is not installed on this system." + return -1 + fi + check_pdffile=$1 if [ -n "$check_pdffile" ] && [ -r "$check_pdffile" ]; then -- cgit v1.2.3