diff options
Diffstat (limited to 'open-as-pdf')
| -rwxr-xr-x | open-as-pdf | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/open-as-pdf b/open-as-pdf new file mode 100755 index 0000000..cc96c09 --- /dev/null +++ b/open-as-pdf @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ $# -eq 0 ] ; then + echo First arguments must be a file. + exit 1 +fi + +PDF_FILE="$(tempfile --suffix .pdf)" +trap 'rm "$PDF_FILE"' EXIT +unoconv --format pdf -o "$PDF_FILE" "$1" && xdg-open "$PDF_FILE" && sleep 5 |
