Use hard links during Sphinx documentation tests
Hard linking the large files in ci/ should be faster than copying them each time. Also, let’s only remove them once; the “cleanup” routine was duplicating work also done at the bottom of the file.
This commit is contained in:
parent
a425df049e
commit
da40988fb2
|
@ -4,16 +4,12 @@ set -e
|
|||
cd "$(dirname ${BASH_SOURCE[0]})"
|
||||
|
||||
# Copy in files that would otherwise need to download.
|
||||
cp ci/* skyfield/documentation
|
||||
ln -f ci/*.* skyfield/documentation
|
||||
|
||||
function cleanup {
|
||||
cd skyfield/documentation
|
||||
rm -f $(cd ../../ci; ls)
|
||||
rm -f $(cd ../../ci; ls *.*)
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
make -C skyfield/documentation doctest
|
||||
|
||||
# Remove the files we copied in.
|
||||
FILES="$(cd ci; ls *.*)"
|
||||
(cd skyfield/documentation; rm $FILES)
|
||||
|
|
Loading…
Reference in New Issue