Merge pull request #15 from subtleq/master

Potential Fix For Issue #3
This commit is contained in:
Carlos Fenollosa 2013-06-12 14:17:07 -07:00
commit dee648833e

8
bb.sh
View File

@ -511,8 +511,8 @@ make_rss() {
echo '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">' >> "$rssfile" echo '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">' >> "$rssfile"
echo '<channel><title>'$global_title'</title><link>'$global_url'</link>' >> "$rssfile" echo '<channel><title>'$global_title'</title><link>'$global_url'</link>' >> "$rssfile"
echo '<description>'$global_description'</description><language>en</language>' >> "$rssfile" echo '<description>'$global_description'</description><language>en</language>' >> "$rssfile"
echo '<lastBuildDate>'$(date -R)'</lastBuildDate>' >> "$rssfile" echo '<lastBuildDate>'$(date +"%a, %d %b %Y %H:%M:%S %z")'</lastBuildDate>' >> "$rssfile"
echo '<pubDate>'$(date -R)'</pubDate>' >> "$rssfile" echo '<pubDate>'$(date +"%a, %d %b %Y %H:%M:%S %z")'</pubDate>' >> "$rssfile"
echo '<atom:link href="'$global_url/$blog_feed'" rel="self" type="application/rss+xml" />' >> "$rssfile" echo '<atom:link href="'$global_url/$blog_feed'" rel="self" type="application/rss+xml" />' >> "$rssfile"
n=0 n=0
@ -528,7 +528,7 @@ make_rss() {
echo "]]></description><link>$global_url/$i</link>" >> "$rssfile" echo "]]></description><link>$global_url/$i</link>" >> "$rssfile"
echo "<guid>$global_url/$i</guid>" >> "$rssfile" echo "<guid>$global_url/$i</guid>" >> "$rssfile"
echo "<dc:creator>$global_author</dc:creator>" >> "$rssfile" echo "<dc:creator>$global_author</dc:creator>" >> "$rssfile"
echo '<pubDate>'$(date -r "$i" -R)'</pubDate></item>' >> "$rssfile" echo '<pubDate>'$(date -r "$i" +"%a, %d %b %Y %H:%M:%S %z")'</pubDate></item>' >> "$rssfile"
n=$(( $n + 1 )) n=$(( $n + 1 ))
done done
@ -625,7 +625,7 @@ rebuild_all_entries() {
awk '/<!-- text begin -->/, /<!-- text end -->/{if (!/<!-- text begin -->/ && !/<!-- text end -->/) print}' "$i" >> "$contentfile" awk '/<!-- text begin -->/, /<!-- text end -->/{if (!/<!-- text begin -->/ && !/<!-- text end -->/) print}' "$i" >> "$contentfile"
# Original post timestamp # Original post timestamp
timestamp="$(date -R -r $i)" timestamp="$(date -r $i +"%a, %d %b %Y %H:%M:%S %z" )"
create_html_page "$contentfile" "$i.rebuilt" no "$title" "$timestamp" create_html_page "$contentfile" "$i.rebuilt" no "$title" "$timestamp"
# keep the original timestamp! # keep the original timestamp!