Skip to content

Commit bda168d

Browse files
committed
tools/install-doc.sh: New
1 parent bf9ba70 commit bda168d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tools/install-doc.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#! /usr/bin/env bash
2+
if [ $# = 0 ]; then
3+
echo >&2 "usage: tools/install-doc.sh .../sagemath_doc_html....whl"
4+
exit 1
5+
fi
6+
set -x
7+
for wheel in $*; do
8+
stem=${wheel%-py3-none-any.whl}
9+
version=${stem##*-}
10+
major_minor=$(echo $version | sed -n -E 's/([0-9]*[.][0-9]*).*/\1/p')
11+
rm -rf docs/${major_minor}/*
12+
mkdir -p docs/${major_minor}/
13+
rm -rf tmp
14+
unzip $wheel -d tmp
15+
mv tmp/passagemath_doc_html-*.data/data/share/doc/sage/*html docs/${major_minor}/
16+
git add docs/${major_minor}/
17+
git commit -m "docs/${major_minor}/: Update from $wheel"
18+
rm -rf tmp
19+
done

0 commit comments

Comments
 (0)