summaryrefslogtreecommitdiff
path: root/html-gen.sh
diff options
context:
space:
mode:
authorPeter Ludikovsky <peter@ludikovsky.name>2016-02-16 10:24:36 +0000
committerPeter Ludikovsky <peter@ludikovsky.name>2016-02-16 10:24:36 +0000
commit37539e6ff6fc44f2c21cbfae691ce52ff0509639 (patch)
tree94bbe9b59a012eaea6840ca91e27afd46f1fcdb3 /html-gen.sh
parentb9a8ee3e34a8781e6a5b50558c50c42ecdf5d01e (diff)
Fixed overwrite of existing files
Diffstat (limited to 'html-gen.sh')
-rw-r--r--html-gen.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/html-gen.sh b/html-gen.sh
index 406da7f..443719d 100644
--- a/html-gen.sh
+++ b/html-gen.sh
@@ -331,7 +331,7 @@ for f in $added_files $modified_files; do
generate_article "$f"
echo "done."
echo -n "[fugitive] Generating $public_dir/${f#$articles_dir/}.html.gz... "
- gzip -9k $public_dir/${f#$articles_dir/}.html
+ gzip -9kfn $public_dir/${f#$articles_dir/}.html
echo "done."
echo "${f#$articles_dir/}" >> "$generated_files"
fi
@@ -384,7 +384,7 @@ if [ $modification -gt 0 ]; then
replace_commit_info "-1" | \
sed "/^[[:space:]]*$/d" > "$temp"
cp "$temp" "$public_dir/archives.html"
- gzip -9k "$public_dir/archives.html"
+ gzip -9kfn "$public_dir/archives.html"
echo "done."
echo -n "[fugitive] Generating $public_dir/rss.xml... "
last_5_articles=`mktemp fugitiveXXXXXX`
@@ -400,7 +400,7 @@ if [ $modification -gt 0 ]; then
replace_commit_info "-1" | \
sed "/^[[:space:]]*$/d" > "$temp"
cp "$temp" "$public_dir/rss.xml"
- gzip -9k "$public_dir/rss.xml"
+ gzip -9kfn "$public_dir/rss.xml"
echo "done."
echo -n "[fugitive] Generating $public_dir/atom.xml... "
last_5_articles=`mktemp fugitiveXXXXXX`
@@ -416,12 +416,12 @@ if [ $modification -gt 0 ]; then
replace_commit_info "-1" | \
sed "/^[[:space:]]*$/d" > "$temp"
cp "$temp" "$public_dir/atom.xml"
- gzip -9k "$public_dir/atom.xml"
+ gzip -9kfn "$public_dir/atom.xml"
echo "done."
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"
- gzip -9k "$public_dir/index.html"
+ gzip -9kfn "$public_dir/index.html"
echo "done".
echo "[fugitive] Blog update complete."
fi