forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rust-lang#521 from ehuss/linkcheck
Add linkchecker.
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
if [ ! -f book.toml ] | ||
then | ||
echo "Run command in root directory with book.toml" | ||
exit 1 | ||
fi | ||
|
||
rm -rf tests/linkcheck tests/linkchecker | ||
|
||
mkdir tests/linkchecker | ||
curl -o tests/linkchecker/Cargo.toml https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/Cargo.toml | ||
curl -o tests/linkchecker/main.rs https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/main.rs | ||
|
||
mdbook build | ||
|
||
cp -R $(rustc --print sysroot)/share/doc/rust/html tests/linkcheck | ||
rm -rf tests/linkcheck/reference | ||
cp -R book tests/linkcheck/reference | ||
|
||
cargo run --manifest-path=tests/linkchecker/Cargo.toml -- tests/linkcheck/reference | ||
|
||
rm -rf tests/linkcheck tests/linkchecker | ||
echo "Linkcheck completed successfully!" |