فهرست منبع

rename *.md file together with *.html

if called like this:
    bb.sh edit -n posted.md
then editing title will rename posted.html to reflect new title.
Now it will rename posted.md, too
Alexey Shpakovsky 11 سال پیش
والد
کامیت
49285d02b8
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      bb.sh

+ 1 - 0
bb.sh

@@ -380,6 +380,7 @@ edit() {
             parse_file "$TMPFILE" "$edit_timestamp" "$filename"
             parse_file "$TMPFILE" "$edit_timestamp" "$filename"
         else
         else
             parse_file "$TMPFILE" "$edit_timestamp" # this command sets $filename as the html processed file
             parse_file "$TMPFILE" "$edit_timestamp" # this command sets $filename as the html processed file
+            [[ "${1##*.}" == "md" ]] && mv "$1" "${filename%%.*}.md" 2>/dev/null
         fi
         fi
         rm "$TMPFILE"
         rm "$TMPFILE"
     fi
     fi