fix live update bug for real ^^' (thx a3nm)

This commit is contained in:
p4bl0 2012-02-26 14:11:36 +01:00
parent a0487b63d9
commit 1d67604df4
1 changed files with 6 additions and 3 deletions

View File

@ -362,6 +362,7 @@ for f in $deleted_files; do
done
if [ $modification -gt 0 ]; then
temp=`mktemp fugitiveXXXXXX`
echo -n "[fugitive] Generating $public_dir/archives.html... "
cat "$templates_dir/archives.html" | \
replace_includes | \
@ -371,7 +372,8 @@ if [ $modification -gt 0 ]; then
replace_str "page_title" "archives" | \
replace_str "blog_url" "$blog_url" | \
replace_commit_info "-1" | \
sed "/^[[:space:]]*$/d" > "$public_dir/archives.html"
sed "/^[[:space:]]*$/d" > "$temp"
cp "$temp" "$public_dir/archives.html"
echo "done."
echo -n "[fugitive] Generating $public_dir/feed.xml... "
last_5_articles=`mktemp fugitiveXXXXXX`
@ -385,9 +387,10 @@ if [ $modification -gt 0 ]; then
replace_str "page_title" "feed" | \
replace_str "blog_url" "$blog_url" | \
replace_commit_info "-1" | \
sed "/^[[:space:]]*$/d" > "$public_dir/feed.xml"
sed "/^[[:space:]]*$/d" > "$temp"
cp "$temp" "$public_dir/feed.xml"
echo "done."
rm "$last_5_articles" "$last_5_commits"
rm "$last_5_articles" "$last_5_commits" "$temp"
echo -n "[fugitive] Using last published article as index page... "
cp "$public_dir/`head -1 $articles_sorted`.html" "$public_dir/index.html"
echo "done".