This commit is contained in:
Carlos Fenollosa 2014-05-07 16:08:55 +02:00
parent 236fdae71c
commit dc84ebde19

8
bb.sh
View File

@ -813,8 +813,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 +"%a, %d %b %Y %H:%M:%S %z")'</lastBuildDate>' >> "$rssfile" echo '<lastBuildDate>'$(LC_ALL=$date_locale date +"%a, %d %b %Y %H:%M:%S %z")'</lastBuildDate>' >> "$rssfile"
echo '<pubDate>'$(date +"%a, %d %b %Y %H:%M:%S %z")'</pubDate>' >> "$rssfile" echo '<pubDate>'$(LC_ALL=$date_locale 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
@ -829,7 +829,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" +"%a, %d %b %Y %H:%M:%S %z")'</pubDate></item>' >> "$rssfile" echo '<pubDate>'$(LC_ALL=$date_locale date -r "$i" +"%a, %d %b %Y %H:%M:%S %z")'</pubDate></item>' >> "$rssfile"
n=$(( $n + 1 )) n=$(( $n + 1 ))
done done
@ -1054,7 +1054,7 @@ do_main() {
chmod 600 ".backup.tar.gz" chmod 600 ".backup.tar.gz"
# Keep first backup of this day containing yesterday's version of the blog # Keep first backup of this day containing yesterday's version of the blog
[[ ! -f .yesterday.tar.gz ]] || [ "$(date -r .yesterday.tar.gz +'%d')" != "$(date +'%d')" ] && [[ ! -f .yesterday.tar.gz ]] || [ "$(LC_ALL=$date_locale date -r .yesterday.tar.gz +'%d')" != "$(LC_ALL=$date_locale date +'%d')" ] &&
cp .backup.tar.gz .yesterday.tar.gz &> /dev/null cp .backup.tar.gz .yesterday.tar.gz &> /dev/null
[[ "$1" == "reset" ]] && [[ "$1" == "reset" ]] &&