| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out that we only need bare HTML files for .md files in news,
yet publish.sh creates them unconditionally. That is, we spend a lot
of time building bare HTML files that we never use.
This commit makes it so that bare HTML files are only generated for
news files, which speeds up the website build significantly:
$ /home/michael/benchmark.sh speed-up-build master
Already on 'speed-up-build'
NOW TESTING ON speed-up-build
0m08.24s real 0m08.53s user 0m05.57s system
0m08.21s real 0m08.39s user 0m05.58s system
0m08.26s real 0m08.23s user 0m05.70s system
0m08.26s real 0m08.27s user 0m05.91s system
0m08.24s real 0m08.36s user 0m05.63s system
0m08.28s real 0m08.40s user 0m05.67s system
0m08.29s real 0m08.21s user 0m05.83s system
0m08.23s real 0m08.12s user 0m05.80s system
0m08.32s real 0m08.32s user 0m05.75s system
0m08.30s real 0m08.40s user 0m05.61s system
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 33 commits.
NOW TESTING ON master
0m12.98s real 0m15.07s user 0m07.18s system
0m12.93s real 0m14.57s user 0m07.69s system
0m12.98s real 0m15.06s user 0m07.46s system
0m12.98s real 0m14.75s user 0m07.67s system
0m12.94s real 0m15.10s user 0m07.22s system
0m12.94s real 0m14.95s user 0m07.22s system
0m12.98s real 0m14.57s user 0m08.02s system
0m12.96s real 0m14.84s user 0m07.41s system
0m12.96s real 0m14.99s user 0m07.49s system
0m13.06s real 0m14.91s user 0m07.54s system
And here's the script in question, benchmark.sh:
#!/bin/sh
set -u
set -e
# usage: runit branch
runit() {
git checkout "$1"
echo
echo NOW TESTING ON "$1"
echo
for i in `jot 10`; do make clean >/dev/null; time make -j2 >/dev/null; done
}
make clean >/dev/null
for branch in "$@"
do
runit "$branch"
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When running "bash -x publish.sh index.md", the following happens:
+ pandoc --smart /tmp/libreboot_www.Xne7SYgf4e -s --css /global.css '--css /headercenter.css' --template template.html --metadata return=
pandoc: unrecognized option `--css /headercenter.css'
Try pandoc --help for more information.
This is because the OPTS variable is being quoted, which causes its
value of "-css /headercenter.css" to not be split on word boundaries,
that is, spaces. Because pandoc has a "--css" option, but not a
"--css /headercenter.css" option, pandoc expectedly complains that
said option does not exist.
To fix this we just unquote OPTS, and add a shellcheck ignore directive
so this won't be reintroduced in the future.
Caused by: a8d89665de6da20a8793886e03f153e922f6e519.
|
|
|
|
|
|
|
| |
All of the warnings were of type SC2086 [1]: Double quote to prevent
globbing and word splitting.
[1]: https://github.com/koalaman/shellcheck/wiki/Sc2086
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before the Makefile, publish.sh was executed on markdown source
files using find(1), which happened like this:
./publish.sh ./index.md
Now that we have a Makefile, this happens instead:
./publish.sh index.md
Note that the file argument "index.md" in the first and second case
both refer to the same file, yet they are different strings. This is
important because publish.sh gives index.md (among other files) special
treatment, and it does this by string comparison.
Unfortunately, only the argument in the first case ("./index.md") will
cause publish.sh to give special treatment, while the argumnent in the
second case ("index.md") will not.
To fix this, make it so that both "./index.md" and "index.md" trigger
publish.sh's special handling. This commit also fixes the same issue
for "docs/fdl-1.3.md" and "conduct.md".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is done by replacing www/generate.sh with a Makefile. Benefits:
- Makes builds incremental, meaning that only the minimum number of
markdown files will be converted to HTML during a build. The previous
scheme always generated a new HTML file for every markdown file,
which is a big waste of time if only 1 or 2 markdown files have been
changed.
- Allows for much faster builds through concurrent jobs (e.g., via
"make -j4"). On my 4-core machine, my average build time for the
website with generate.sh was just over 26 seconds; with "make -j4",
it was 13 seconds.
- Avoids portability issues with find(1) in generate.sh, which I was
encountering on OpenBSD.
A note on portability: unlike GNU Make, OpenBSD's Make does not have
the "$(shell [commands])" construct, so we don't use that. Instead we
use "!= [commands]", which is supported by both.
|
|
|
|
|
|
| |
Instead of always using the same file (temp.md), use a unique temporary
file so that multiple instances of publish.sh do not clobber each
other's work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On OpenBSD, publish.sh errors out at the following call
to sed(1) (from "bash -x publish.sh"):
+ sed temp.md -i -e 's/\.md\(#[a-z\-]*\)*)/.html\1)/g'
sed: 1: "temp.md": undefined label 'emp.md'
It seems that "temp.md" is being parsed by sed as a sed command,
not as a named file. This is likely due to OpenBSD's strict
usage requirements for sed:
usage: sed [-aEnru] [-i[extension]] command [file ...]
sed [-aEnru] [-e command] [-f command_file] [-i[extension]] [file ...]
As shown above, the sed command must always come before any named
files. This commit does that, which fixes publish.sh with OpenBSD's sed.
This is also tested and working with GNU sed v4.2.2
|
|
|
|
|
| |
This is mainly useful for being able to run these scripts on BSDs.
And for users who use a Bash not installed to /bin.
|
|
|
|
| |
Continuation of pull request #217 re: printf usage.
|
|
|
|
|
|
|
|
|
| |
All printf calls should now be properly formatted; prior, the
format specifier string was erroneously used for both the format
specifiers and the string to be printed. 'env' is now used to
locate the printf binary so as to avoid potentially using a shell
builtin. Lastly, all calls to 'echo' within the new build system
have been replaced with printf for consistency/portability purposes.
|
|
|
|
|
| |
pull request not needed. alyssa gave me permission via email, to push this
directly to master
|
|
|
|
|
|
|
| |
This is necessary, so that people know how to modify the website and send
improvements, like they do on wiki sites. Although Libreboot is git-hosted,
having this link helps. It goes to a section added to the Git page,
instructing users how to edit the website and documentation.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Section links are still visible when CSS is not enabled. On browsers,
headers need to be hovered for links. On screen-readers, they are hidden
entirely.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Alyssa, you need to make sure that variables are always bound.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|