1
0
Fork 0
mirror of https://git.ludikovsky.name/git/fugitive.git synced 2024-05-18 14:35:32 +02:00

fix live update bug

This commit is contained in:
Antoine Amarilli 2012-02-26 14:06:16 +01:00 committed by p4bl0
parent 198bb426fd
commit a0487b63d9

View file

@ -288,6 +288,7 @@ replace_foreach () {
} }
generate_article() { generate_article() {
temp=`mktemp fugitiveXXXXXX`
art="${1#$articles_dir/}" art="${1#$articles_dir/}"
title=`get_article_title "$art"` title=`get_article_title "$art"`
cat "$templates_dir/article.html" | \ cat "$templates_dir/article.html" | \
@ -296,7 +297,8 @@ generate_article() {
replace_str "blog_url" "$blog_url" | \ replace_str "blog_url" "$blog_url" | \
replace_commit_info "-1" | \ replace_commit_info "-1" | \
replace_article_info "$art" | \ replace_article_info "$art" | \
sed "/^[[:space:]]*$/d" > "$public_dir/$art.html" sed "/^[[:space:]]*$/d" > "$temp"
mv "$temp" "$public_dir/$art.html"
} }
regenerate_previous_and_next_article_maybe() { regenerate_previous_and_next_article_maybe() {