aboutsummaryrefslogtreecommitdiff
path: root/www/index.sh
Commit message (Collapse)AuthorAgeFilesLines
* www/index.sh: Refactor and simplify rss()Michael Reed2017-07-131-14/+26
| | | | | | Splitting rss() into 3 smaller functions allows factoring the for-loop out of rss() This is done by having the new rss_main() function take an argument instead of operating on a global variable, as rss() did before.
* www/index.sh: Organize in a less surprising mannerMichael Reed2017-07-131-14/+14
| | | | | I find it easier to read this file if all function definitions come first, then all the actual stuff we do comes at the end.
* www/index.sh: Make meta() and title() take argumentsMichael Reed2017-07-131-7/+10
| | | | | It makes the code easier to understand than the global variables that were used before.
* www/index.sh: Replace cat(1) usage with faster bashismMichael Reed2017-07-121-1/+1
|
* www/index.sh: Fix OpenBSD touch(1) incompatibility, take #2Michael Reed2017-07-101-2/+2
| | | | | | | | | | | | | | | | | | | | | When running index.sh on OpenBSD, the following error happens for each item in the news/ directory (output is from "bash -x"): + touch -d '4 Jun 2017' news/andrew-robbins-new-maintainer.md touch: out of range or illegal time specification: YYYY-MM-DDThh:mm:ss[.frac][Z] This is because OpenBSD's touch(1) requires that the "d" flag's argument be in ISO 8601 format, that is, "YYYY-MM-DDThh:mm:ss[.frac][Z]". This could have been dealt with by converting the article date (determined by "sed -n 3p $f | sed -e 's/^..//g'") to ISO 8601 format, then passing the date to touch(1). That would have required even more code, so was discarded as a possible solution. Instead, we solve this by keeping a MANIFEST file under news/, which is read to determine (a) which articles should be added to news/index.md, and (b) in which order. This avoids the need for touch(1) altogether, finally making the whole libreboot website build properly on OpenBSD. This also allows a minor simplification in the Makefile.
* Revert last commit (it caused issues. no PR needed; mreed permits the revert)Leah Rowe2017-07-111-1/+2
| | | | This reverts commit bfc86546849e15dd98362852e76fa9feac2fba77.
* www/index.sh: Fix OpenBSD touch(1) incompatibilityMichael Reed2017-07-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When running index.sh on OpenBSD, the following error happens for each item in the news/ directory (output is from "bash -x"): + touch -d '4 Jun 2017' news/andrew-robbins-new-maintainer.md touch: out of range or illegal time specification: YYYY-MM-DDThh:mm:ss[.frac][Z] This is because OpenBSD's touch(1) requires that the "d" flag's argument be in ISO 8601 format, that is, "YYYY-MM-DDThh:mm:ss[.frac][Z]". This could have been dealt with by converting the article date (determined by "sed -n 3p $f | sed -e 's/^..//g'") to ISO 8601 format, then passing the date to touch(1). That would have required even more code, so was discarded as a possible solution. Instead, this has been solved by prepending the ISO 8601 date to the names of all news items. This has the benefit of avoiding the need for touch(1) altogether, as a lexicographic sorting of ISO 8601 dates is the same as a date-based sorting. In other words, "ls news/*.md" will give a list of articles sorted by date, which we can then append to news/index.md in that order. One downside of this solution is that it introduces the possibility that the date in the filename (ISO 8601 format) of a news article does not match the date inside the article (e.g., 1 May 2017). I have not dealt with this as it remains to be seen whether it will be a problem in practice.
* docs/index.sh: Fix sed(1) invocation on OpenBSDMichael Reed2017-07-091-1/+1
| | | | | | | | | | | | This is the same idea as 497a49162f7c8b5c1d7c653087b0ac6c8e5765f9. Without this patch, the following errors occur when running index.sh: sed: 1: "news/new-mailing-lists. ...: extra characters at the end of n command sed: 1: "news/andrew-robbins-new ...: extra characters at the end of n command sed: 1: "news/formalised-structu ...: extra characters at the end of n command sed: 1: "news/proposal-rejoin-gn ...: extra characters at the end of n command sed: 1: "news/unity.bare.html": extra characters at the end of n command
* Replaced '#!/bin/bash' w/ '#!/usr/bin/env bash'Andrew Robbins2017-06-231-1/+1
| | | | | This is mainly useful for being able to run these scripts on BSDs. And for users who use a Bash not installed to /bin.
* Swapped out 'echo' calls w/ 'printf ...'Andrew Robbins2017-06-231-18/+18
| | | | Continuation of pull request #217 re: printf usage.
* Fix double news/Alyssa Rosenzweig2017-04-081-1/+1
|
* Further adapt RSSAlyssa Rosenzweig2017-04-081-7/+7
|
* Integrate RSS feedAlyssa Rosenzweig2017-04-081-5/+47
|
* Rename blog/ to news/Leah Rowe2017-04-081-4/+4
|
* Setup blogging infrastructureAlyssa Rosenzweig2017-04-081-0/+36