]> git.lizzy.rs Git - rust.git/blob - bootstrap.sh
d3878d9d61c214d79137ce288316a52a82e681b5
[rust.git] / bootstrap.sh
1 #!/bin/bash
2
3 # Make sure you double check the diffs after running this script - with great
4 # power comes great responsibility.
5 # We deliberately avoid reformatting files with rustfmt comment directives.
6
7 cargo build --release
8
9 target/release/rustfmt --write-mode=overwrite src/lib.rs
10 target/release/rustfmt --write-mode=overwrite src/bin/rustfmt.rs
11 target/release/rustfmt --write-mode=overwrite src/bin/cargo-fmt.rs
12 target/release/rustfmt --write-mode=overwrite tests/system.rs
13
14 for filename in tests/target/*.rs; do
15     if ! grep -q "rustfmt-" "$filename"; then
16         target/release/rustfmt --write-mode=overwrite $filename
17     fi
18 done