diff options
Diffstat (limited to '')
-rwxr-xr-x | rs.sh | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -5,20 +5,13 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. +# Please see the LICENSE file for more details. die() { echo "-> [$(date +%R)] (!) ERROR: Unexpected error, please report : $1 (!)" exit 1 } -# Articles -articles="$(find articles/*.md|sed -e 's@.md@@g' -e 's@articles/@@g')" || die "Unknown error" +articles="$(find articles/*.md|sed -e 's@.md@@g' -e 's@articles/@@g')" || die "Unknown error" # Articles echo "-> [$(date +%R)] Generating RSS feed ..." -touch "www/rss.xml" # Set the defaults rssBlogTitle="blog" rssBlogDescription="It's a blog" @@ -29,8 +22,7 @@ printf '%s\n' '<channel>' >> "www/rss.xml" printf '%s\n' "<title>${rssBlogTitle}</title>" >> "www/rss.xml" printf '%s\n' "<link>BLANK</link>" >> "www/rss.xml" printf '%s\n' "<description>$rssBlogDescription</description>" >> "www/rss.xml" -# Items -for line in ${articles} +for line in ${articles} # Items do echo "-> [$(date +%R)] Inserting XML ${line} item ..." . "articles/${line}.cfg" |