소스 검색

Use previous blog post index

Bob Mottram 9 년 전
부모
커밋
74437ea53a
No account linked to committer's email
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2
    1
      src/freedombone-mesh-blog

+ 2
- 1
src/freedombone-mesh-blog 파일 보기

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