From 450f300ff41dd94aa885fa521c6836477d634edb Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Thu, 10 Jan 2019 17:22:56 +0000 Subject: [PATCH] Adds script for converting files to PDF --- bin/createPDF | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 bin/createPDF diff --git a/bin/createPDF b/bin/createPDF new file mode 100755 index 00000000..9f812307 --- /dev/null +++ b/bin/createPDF @@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +file=$(readlink -f "$1") +dir=$(dirname "$file") +base="${file%.*}" + +cd "$dir" || exit + +case "$file" in + *\.doc|*\.docx) libreoffice --convert-to pdf "$file" ;; + *) echo "Don't know how to convert $file" + +libreoffice --convert-to pdf Checkit\ website\ development\ brief.docx