mirror of
https://git.ludikovsky.name/git/fugitive.git
synced 2024-10-05 15:35:29 +02:00
fix live update bug for real ^^' (thx a3nm)
This commit is contained in:
parent
a0487b63d9
commit
1d67604df4
|
@ -362,6 +362,7 @@ for f in $deleted_files; do
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $modification -gt 0 ]; then
|
if [ $modification -gt 0 ]; then
|
||||||
|
temp=`mktemp fugitiveXXXXXX`
|
||||||
echo -n "[fugitive] Generating $public_dir/archives.html... "
|
echo -n "[fugitive] Generating $public_dir/archives.html... "
|
||||||
cat "$templates_dir/archives.html" | \
|
cat "$templates_dir/archives.html" | \
|
||||||
replace_includes | \
|
replace_includes | \
|
||||||
|
@ -371,7 +372,8 @@ if [ $modification -gt 0 ]; then
|
||||||
replace_str "page_title" "archives" | \
|
replace_str "page_title" "archives" | \
|
||||||
replace_str "blog_url" "$blog_url" | \
|
replace_str "blog_url" "$blog_url" | \
|
||||||
replace_commit_info "-1" | \
|
replace_commit_info "-1" | \
|
||||||
sed "/^[[:space:]]*$/d" > "$public_dir/archives.html"
|
sed "/^[[:space:]]*$/d" > "$temp"
|
||||||
|
cp "$temp" "$public_dir/archives.html"
|
||||||
echo "done."
|
echo "done."
|
||||||
echo -n "[fugitive] Generating $public_dir/feed.xml... "
|
echo -n "[fugitive] Generating $public_dir/feed.xml... "
|
||||||
last_5_articles=`mktemp fugitiveXXXXXX`
|
last_5_articles=`mktemp fugitiveXXXXXX`
|
||||||
|
@ -385,9 +387,10 @@ if [ $modification -gt 0 ]; then
|
||||||
replace_str "page_title" "feed" | \
|
replace_str "page_title" "feed" | \
|
||||||
replace_str "blog_url" "$blog_url" | \
|
replace_str "blog_url" "$blog_url" | \
|
||||||
replace_commit_info "-1" | \
|
replace_commit_info "-1" | \
|
||||||
sed "/^[[:space:]]*$/d" > "$public_dir/feed.xml"
|
sed "/^[[:space:]]*$/d" > "$temp"
|
||||||
|
cp "$temp" "$public_dir/feed.xml"
|
||||||
echo "done."
|
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... "
|
echo -n "[fugitive] Using last published article as index page... "
|
||||||
cp "$public_dir/`head -1 $articles_sorted`.html" "$public_dir/index.html"
|
cp "$public_dir/`head -1 $articles_sorted`.html" "$public_dir/index.html"
|
||||||
echo "done".
|
echo "done".
|
||||||
|
|
Loading…
Reference in a new issue