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 | a3e77b130dd9605fd226249e972833d28687dad8 (patch) | |
tree | 24924f4427c59dff820d84148f8a30c99f93d702 | |
parent | ce018d219373b675fe1e63c323eaf06e65713f75 (diff) |
add build and new scripts
-rw-r--r-- | build.sh | 6 | ||||
-rw-r--r-- | new.sh | 13 |
2 files changed, 19 insertions, 0 deletions
diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..d0b8a2e --- /dev/null +++ b/build.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +[ -d dist ] && rm -r dist +mkdir dist + +shblg -i site -o dist @@ -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 |