summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanielsLPecke <daniel.letsplay007@gmail.com>2016-11-14 13:42:03 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-11-14 14:48:26 +0100
commita460a4ff0b00583d6a4968c769b71a8d7e4955c3 (patch)
tree144c89f70929f1d679bef75738fa738ce7bad8c5
parent195648efed7d434fbe9b43af942824bf44a73286 (diff)
downloadimpressive-display-a460a4ff0b00583d6a4968c769b71a8d7e4955c3.tar.gz
impressive-display-a460a4ff0b00583d6a4968c769b71a8d7e4955c3.tar.bz2
impressive-display-a460a4ff0b00583d6a4968c769b71a8d7e4955c3.zip
Drop local_pdffile function, don't reference unused PDF_FILE variable anymore.
-rwxr-xr-xbin/impressive-display27
1 files changed, 6 insertions, 21 deletions
diff --git a/bin/impressive-display b/bin/impressive-display
index 5ef5ba5..7db3d11 100755
--- a/bin/impressive-display
+++ b/bin/impressive-display
@@ -257,20 +257,6 @@ function merge_portrait_documents {
}
-function local_pdffile {
-
- cp $PDF_FILE $workdir/$(basename $PDF_FILE)
-
- # is the PDF file gzipped?
- if echo $(basename $PDF_FILE) | grep -E ".*\.gz"; then
- PDF_FILE=${PDF_FILE/.gz/}
- gunzip $workdir/$(basename $PDF_FILE).gz
- fi
- mv $workdir/$(basename $PDF_FILE) "$pdffile_downloaded"
-
- merge_portrait_documents
-
-}
function is_rush_hour {
@@ -340,8 +326,13 @@ function download_pdffile {
fi
curl $creds "$PDF_URI" 1> "$pdffile_downloaded" 2>/dev/null
- if pdfinfo "$pdffile_downloaded" 1>/dev/null 2>/dev/null; then
+ # is the PDF file gzipped?
+ if echo $(basename $pdffile_downloaded) | grep -E ".*\.gz"; then
+ pdffile_downloaded=${pdffile_downloaded/.gz/}
+ gunzip $workdir/$(basename $pdffile_downloaded).gz
+ fi
+ if pdfinfo "$pdffile_downloaded" 1>/dev/null 2>/dev/null; then
merge_portrait_documents
cmp -s "$pdffile_downloaded" "$pdffile_previous"> /dev/null
@@ -458,12 +449,6 @@ if [ -n "$PDF_URI" ]; then
create_lock
download_loop
-elif [ -n "$PDF_FILE" ]; then
-
- $OUTPUT "INFO: PDF_FILE is configured. Using local PDF file: $PDF_FILE"
- create_lock
- local_pdffile
-
else
$OUTPUT "ERROR: PDF_URI hasn't been configured. Doing nothing."