mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-17 06:26:55 +00:00
Add a bootstrap script for running rustfmt on itself.
This commit is contained in:
parent
a9c3108c9c
commit
95cc135bac
18
bootstrap.sh
Executable file
18
bootstrap.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Make sure you double check the diffs after running this script - with great
|
||||
# power comes great responsibility.
|
||||
# We deliberately avoid reformatting files with rustfmt comment directives.
|
||||
|
||||
cargo build
|
||||
|
||||
target/debug/rustfmt --write-mode=overwrite src/lib.rs
|
||||
target/debug/rustfmt --write-mode=overwrite src/bin/rustfmt.rs
|
||||
target/debug/rustfmt --write-mode=overwrite src/bin/cargo-fmt.rs
|
||||
target/debug/rustfmt --write-mode=overwrite tests/system.rs
|
||||
|
||||
for filename in tests/target/*.rs; do
|
||||
if ! grep -q "rustfmt-" "$filename"; then
|
||||
target/debug/rustfmt --write-mode=overwrite $filename
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue
Block a user