12 lines
232 B
Bash
12 lines
232 B
Bash
|
#! /bin/bash
|
||
|
[ ! -r "$1" ] && {
|
||
|
echo "Usage: $0 <input file>" >&2
|
||
|
return 1
|
||
|
}
|
||
|
TEMP_FILE=$(mktemp --tmpdir -u "$(basename "$1").XXXXXX.html")
|
||
|
pandoc "$1" > "$TEMP_FILE"
|
||
|
x-www-browser "$TEMP_FILE"
|
||
|
sleep 2
|
||
|
/bin/rm "$TEMP_FILE"
|
||
|
|