3 # Builds documentation for all target triples that we have a registered URL for
4 # in liblibc. This scrapes the list of triples to document from `src/lib.rs`
5 # which has a bunch of `html_root_url` directives we pick up.
9 TARGETS
=`grep html_root_url src/lib.rs | sed 's/.*".*\/\(.*\)"/\1/'`
14 cp ci
/landing-page-head.html target
/doc
/index.html
16 for target
in $TARGETS; do
17 echo documenting
$target
19 rustdoc
-o target
/doc
/$target --target $target src
/lib.rs
--cfg cross_platform_docs \
22 echo "<li><a href="/libc
/$target/libc
/index.html
">$target</a></li>" \
23 >> target
/doc
/index.html
26 cat ci
/landing-page-footer.html
>> target
/doc
/index.html
28 # If we're on travis, not a PR, and on the right branch, publish!
29 if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
30 pip
install ghp_import
--install-option="--prefix=$HOME/.local"
31 $HOME/.local
/bin
/ghp-import
-n target
/doc
32 git push
-qf https
://${GH_TOKEN}@github.com
/${TRAVIS_REPO_SLUG}.git gh-pages