Skip to content

Commit 98c9052

Browse files
committed
Fix linkcheck script from getting out of sync.
1 parent 2577825 commit 98c9052

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/tools/linkchecker/linkcheck.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ fi
8585
if [ ! -e "linkchecker/main.rs" ] || [ "$iterative" = "0" ]
8686
then
8787
echo "Downloading linkchecker source..."
88+
nightly_hash=$(rustc +nightly -Vv | grep commit-hash | cut -f2 -d" ")
89+
url="https://raw.githubusercontent.com/rust-lang/rust"
8890
mkdir linkchecker
89-
curl -o linkchecker/Cargo.toml \
90-
https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/Cargo.toml
91-
curl -o linkchecker/main.rs \
92-
https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/main.rs
91+
curl -o linkchecker/Cargo.toml ${url}/${nightly_hash}/src/tools/linkchecker/Cargo.toml
92+
curl -o linkchecker/main.rs ${url}/${nightly_hash}/src/tools/linkchecker/main.rs
9393
fi
9494

9595
echo "Building book \"$book_name\"..."

0 commit comments

Comments
 (0)