diff options
author | davidovski <david@davidovski.xyz> | 2023-07-21 11:12:52 +0200 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2023-07-21 11:12:52 +0200 |
commit | 4af1486a3beef10d1fc8fe048d79d41c7bb9346b (patch) | |
tree | 24924f4427c59dff820d84148f8a30c99f93d702 /new.sh | |
parent | a85890b3e6a5b678b47e1964731ad00cf4645f04 (diff) |
add build and new scripts
Diffstat (limited to 'new.sh')
-rw-r--r-- | new.sh | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -0,0 +1,13 @@ +#!/bin/sh + +EDITOR=nvim +TEMPFILE=/tmp/blog_entry.md + +$EDITOR $TEMPFILE + +NAME=site/entries/$(head -1 $TEMPFILE | cut -d" " -f2- | tr " " "-" | tr "[:upper:]" "[:lower:]").html + +cp $TEMPFILE "$NAME" +rm $TEMPFILE + +chmod +x $NAME |