Use previous blog post index

This commit is contained in:
Bob Mottram 2016-09-09 09:14:52 +01:00
parent c379354bbe
commit 74437ea53a
No known key found for this signature in database
GPG Key ID: 0452CC7CEA982E38
1 changed files with 2 additions and 1 deletions

View File

@ -91,7 +91,8 @@ function edit_blog {
return
fi
CURRENT_INDEX=$(cat $CURRENT_BLOG_INDEX)
LAST_BLOG_ENTRY=$BLOG_CONTENT_PATH/${CURRENT_INDEX}_post.rst
PREVIOUS_INDEX=$((CURRENT_INDEX - 1))
LAST_BLOG_ENTRY=$BLOG_CONTENT_PATH/${PREVIOUS_INDEX}_post.rst
if [ ! -f $LAST_BLOG_ENTRY ]; then
return
fi