Improved the tool scripts.
- Avoid the empty lastmod file. - Check if there is no post. - Fixed the prompt message.
This commit is contained in:
@@ -45,6 +45,7 @@ read_tags() {
|
||||
|
||||
|
||||
init() {
|
||||
|
||||
if [[ -d categories ]]; then
|
||||
rm -rf categories
|
||||
fi
|
||||
@@ -53,6 +54,10 @@ init() {
|
||||
rm -rf tags
|
||||
fi
|
||||
|
||||
if [[ ! -d _posts ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mkdir categories tags
|
||||
}
|
||||
|
||||
@@ -130,6 +135,7 @@ create_pages() {
|
||||
|
||||
|
||||
main() {
|
||||
|
||||
init
|
||||
|
||||
for _file in $(ls "_posts")
|
||||
|
||||
Reference in New Issue
Block a user