Skip to content

Commit

Permalink
fix: Escape bench script $mktarget
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverRainZ committed Jul 23, 2024
1 parent 9884cdf commit 9208f19
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions utils/bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
set -e

sphinxver=v7.3.7
sphinxopts=-Q
mktarget=$(tail -n+25 $(git rev-parse --show-toplevel)/docs/Makefile)

tmpdir=$(mktemp -d)
echo $tmpdir
echo "tmpdir: $tmpdir"
cd $tmpdir

python --version
Expand All @@ -19,20 +20,20 @@ pip show sphinx sphinxnotes-fasthtml

compare() {
echo "" >> index.rst
make SPHINXOPTS=-Q html
make SPHINXOPTS=$sphinxopts html
echo ">>> Standard build"
echo "Another line" >> index.rst
time make SPHINXOPTS=-Q html
time make SPHINXOPTS=$sphinxopts html
echo ">>> Fast build"
echo "Another line" >> index.rst
time make SPHINXOPTS=-Q fasthtml
time make SPHINXOPTS=$sphinxopts fasthtml
}

echo "=== Sphinx"
git clone --quiet --branch $sphinxver --depth 1 https://github.com/sphinx-doc/sphinx.git >/dev/null
cd sphinx/doc
echo "extensions.append('sphinxnotes.fasthtml')" >> conf.py
echo $mktarget >> Makefile
echo "$mktarget" >> Makefile
compare
cd ..

Expand Down

0 comments on commit 9208f19

Please sign in to comment.