Last active
August 29, 2015 14:07
-
-
Save chreke/bda3d406809c04409bc8 to your computer and use it in GitHub Desktop.
Render Markdown and open in browser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
OUTPUT=/tmp/$(basename $1).html | |
markdown $1 > $OUTPUT | |
open $OUTPUT | |
# FIXME: This is a hack to prevent deleting the file before it's opened. | |
# Is it possible to use `wait` instead? | |
sleep 1 | |
rm $OUTPUT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment