summaryrefslogtreecommitdiff
path: root/openmd
blob: 0a9a889b34200d22669de38c7d91007908e5e9cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

if [ -z "$1" ]; then
    echo "Usage: openmd file"
    exit 1
fi

file="$1"
tmp_pdf="$(mktemp --suffix=.pdf)"

pandoc "$file" -o "$tmp_pdf" &>/dev/null
zathura "$tmp_pdf"

# cleanup after zathura closes
rm -f "$tmp_pdf"