Removed unecessary '>>'

master
Mroik 2020-08-14 22:54:29 +02:00
parent 3c754bd22c
commit 2ac5e14809
No known key found for this signature in database
GPG Key ID: 48797EA19C19BED1
1 changed files with 21 additions and 15 deletions

View File

@ -9,25 +9,31 @@ else
fi
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > $location
echo "<rss version=\"2.0\">" >> $location
echo "<channel>" >> $location
echo "<title>~$user on TTBP</title>" >> $location
echo "<link>http://tilde.town/~$user/blog/</link>" >> $location
echo "<updated>$(date)</updated>" >> $location
echo "<description>$user's blog on tilde.town</description>" >> $location
{
echo "<rss version=\"2.0\">"
echo "<channel>"
echo "<title>~$user on TTBP</title>"
echo "<link>http://tilde.town/~$user/blog/</link>"
echo "<updated>$(date)</updated>"
echo "<description>$user's blog on tilde.town</description>"
} >> $location
for x in $(ls /home/$user/.ttbp/entries)
do
echo "<item>" >> $location
echo "<title>$(echo $x | sed -E s/\.txt//g)</title>">> $location
echo "<pubDate>$(echo $x | awk '{printf substr($0,1,4) "-" substr($0,5,2) "-" substr($0,7,2)}')</pubDate>" >> $location
echo "<link>http://tilde.town/~$user/blog/$(echo $x | sed -E s/\.txt/\.html/)</link>" >> $location
echo "<description><![CDATA[$(cat /home/$user/.ttbp/entries/$x)]]></description>" >> $location
echo "<author>$user@tilde.town</author>" >> $location
echo "</item>" >> $location
{
echo "<item>"
echo "<title>$(echo $x | sed -E s/\.txt//g)</title>"
echo "<pubDate>$(echo $x | awk '{printf substr($0,1,4) "-" substr($0,5,2) "-" substr($0,7,2)}')</pubDate>"
echo "<link>http://tilde.town/~$user/blog/$(echo $x | sed -E s/\.txt/\.html/)</link>"
echo "<description><![CDATA[$(cat /home/$user/.ttbp/entries/$x)]]></description>"
echo "<author>$user@tilde.town</author>"
echo "</item>"
} >> $location
done
echo "</channel>" >> $location
echo "</rss>" >> $location
{
echo "</channel>"
echo "</rss>"
} >> $location
echo "Finished generating rss feed... you can now go to $(echo $location | sed -E "s/^.*public_html/http:\/\/tilde\.town\/~$user/")"