#!/bin/bash

set -e
cd "$(dirname ${BASH_SOURCE[0]})"

# Copy in files that would otherwise need to download.
cp ci/* skyfield/documentation

function cleanup {
    cd skyfield/documentation
    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)

#!/bin/bash

set -e
cd "$(dirname ${BASH_SOURCE[0]})"

# Copy in files that would otherwise need to download.
ln -f ci/*.* skyfield/documentation

function cleanup {
    cd skyfield/documentation
    rm -f $(cd ../../ci; ls *.*)
}
trap cleanup EXIT

make -C skyfield/documentation doctest

Use hard links during Sphinx documentation tests
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.
