all repos — aaoth.xyz @ fad51a988ca2896681e03bb5367501135ed62088

aaoth.xyz website

rename pgp key file to just pgp and fix shellcheck complaints
la-ninpre leobrekalini@gmail.com
Wed, 02 Jun 2021 23:57:59 +0300
commit

fad51a988ca2896681e03bb5367501135ed62088

parent

4b40cbc0dddda0c92094e8435fb144d9d071ae5e

3 files changed, 9 insertions(+), 9 deletions(-)

jump to
M _includes/footer.html_includes/footer.html

@@ -7,7 +7,7 @@ </a>

</p> <p> <p>gpg key: - <a href="/DD1F79DC24054C1F42440F2E405C2C163EF6A2C9.asc"> + <a href="/pgp.asc"> 405C2C163EF6A2C9 </a> </p>
M aaoth_new_post.shaaoth_new_post.sh

@@ -24,13 +24,13 @@ echo " print usage information"

} read_title() { - echo -n "new post title: " - read TITLE + echo "new post title: " + read -r TITLE } read_tags() { - echo -n "new post tags: " - read TAGS + echo "new post tags: " + read -r TAGS } create_tag_page() {

@@ -44,7 +44,7 @@ ---

TAG } -cd $SITE_DIR +cd "$SITE_DIR" || exit 1 # if there are no arguments specified, run interactively if [ $# -gt 0 ]

@@ -79,7 +79,7 @@

[ -z "$TAGS" ] && read_tags [ -z "$TAGS" ] && echo "specify at least one tag" && exit 1 -TITLE_FILE=$(echo $TITLE | tr '[A-Z]' '[a-z]' | sed 's/ /-/g') +TITLE_FILE=$(echo "$TITLE" | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g') POST_FILENAME="$POSTS_DIR/$DATE_SHORT-$TITLE_FILE.md"

@@ -87,7 +87,7 @@ for _tag in $TAGS

do [ ! -f "./tags/$_tag.md" ] \ && echo "tag $_tag is not present, creating one" \ - && create_tag_page $_tag + && create_tag_page "$_tag" done # template is currently hardcoded

@@ -103,4 +103,4 @@ <!--more-->

EOF -nvim -c "normal 6jo" -c "startinsert" $POST_FILENAME +nvim -c "normal 6jo" -c "startinsert" "$POST_FILENAME"