diff options
author | DanielsLPecke <daniel.letsplay007@gmail.com> | 2016-11-14 13:42:03 +0100 |
---|---|---|
committer | DanielsLPecke <daniel.letsplay007@gmail.com> | 2016-11-14 14:41:38 +0100 |
commit | 3270066e7d42b7a6f9c50a892dd47e63f3314d12 (patch) | |
tree | 6b79e96d423dce520c87b39d105e2c81bca78533 | |
parent | a9f06f709f24c8ec7159ca6ec9c68d0506146154 (diff) | |
download | impressive-display-pr/multidisplaysupport.tar.gz impressive-display-pr/multidisplaysupport.tar.bz2 impressive-display-pr/multidisplaysupport.zip |
Drop local_pdffile function, don't reference unused PDF_FILE variable anymore.pr/multidisplaysupport
-rwxr-xr-x | bin/impressive-display | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/bin/impressive-display b/bin/impressive-display index ac07681..2186d29 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 @@ -456,12 +447,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." |