davidovski/new.sh

13 lines
178 B
Bash
Executable file

#!/bin/sh
EDITOR=nvim
TEMPFILE=/tmp/blog_entry.md
$EDITOR $TEMPFILE
NAME=entries/$(head -1 $TEMPFILE | cut -d" " -f2-).html
cp $TEMPFILE "$NAME"
rm $TEMPFILE
chmod +x $NAME