Skip to content

Commit

Permalink
Merge pull request #1780 from tock/moooooo
Browse files Browse the repository at this point in the history
doc: use copy-on-write for docs
  • Loading branch information
bradjc committed Apr 30, 2020
2 parents 312ab7f + c495e83 commit ae0f004
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tools/build-all-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,23 @@ set -e
# Delete any old docs
rm -rf doc/rustdoc

# Use copy-on-write cp if available
touch _COW
if `cp -c _COW _COW2 2> /dev/null`; then
# BSD (OS X) default
CP_COW="cp -c"
elif `cp --reflink=auto _COW _COW2 2> /dev/null`; then
# Coreutils (unix) default
CP_COW="cp --reflink=auto"
else
echo "$(tput bold)Warn: No copy-on-write cp available. Doc build will be slower.$(tput sgr0)"
CP_COW="cp"
fi
rm -f _COW _COW2

# Make the documentation for all the boards and move it to doc/rustdoc.
make alldoc
cp -r target/doc doc/rustdoc
$CP_COW -r target/doc doc/rustdoc

# Temporary redirect rule
# https://www.netlify.com/docs/redirects/
Expand Down

0 comments on commit ae0f004

Please sign in to comment.