aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2021-06-02 23:57:59 +0300
committerla-ninpre <leobrekalini@gmail.com>2021-06-02 23:57:59 +0300
commitfad51a988ca2896681e03bb5367501135ed62088 (patch)
tree71aae7b8163eb9d606cbb08d094f318c10456854
parent4b40cbc0dddda0c92094e8435fb144d9d071ae5e (diff)
downloadaaoth.xyz-fad51a988ca2896681e03bb5367501135ed62088.tar.gz
aaoth.xyz-fad51a988ca2896681e03bb5367501135ed62088.zip
rename pgp key file to just pgp and fix shellcheck complaints
-rw-r--r--_includes/footer.html2
-rwxr-xr-xaaoth_new_post.sh16
-rw-r--r--pgp.asc (renamed from DD1F79DC24054C1F42440F2E405C2C163EF6A2C9.asc)0
3 files changed, 9 insertions, 9 deletions
diff --git a/_includes/footer.html b/_includes/footer.html
index a44e767..d3e9dc5 100644
--- a/_includes/footer.html
+++ b/_includes/footer.html
@@ -7,7 +7,7 @@
</p>
<p>
<p>gpg key:
- <a href="/DD1F79DC24054C1F42440F2E405C2C163EF6A2C9.asc">
+ <a href="/pgp.asc">
405C2C163EF6A2C9
</a>
</p>
diff --git a/aaoth_new_post.sh b/aaoth_new_post.sh
index 3ca34b4..8c2139f 100755
--- a/aaoth_new_post.sh
+++ b/aaoth_new_post.sh
@@ -24,13 +24,13 @@ usage() {
}
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 @@ permalink: /tags/$1/
TAG
}
-cd $SITE_DIR
+cd "$SITE_DIR" || exit 1
# if there are no arguments specified, run interactively
if [ $# -gt 0 ]
@@ -79,7 +79,7 @@ fi
[ -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 @@ tags: $TAGS
EOF
-nvim -c "normal 6jo" -c "startinsert" $POST_FILENAME
+nvim -c "normal 6jo" -c "startinsert" "$POST_FILENAME"
diff --git a/DD1F79DC24054C1F42440F2E405C2C163EF6A2C9.asc b/pgp.asc
index 56a0631..56a0631 100644
--- a/DD1F79DC24054C1F42440F2E405C2C163EF6A2C9.asc
+++ b/pgp.asc