summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/bootstrap.sh
blob: 05ac0ce2f306fc4bcf4802242017887b31f8ca9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/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 --release

target/release/rustfmt src/lib.rs
target/release/rustfmt src/bin/main.rs
target/release/rustfmt src/cargo-fmt/main.rs

for filename in tests/target/*.rs; do
    if ! grep -q "rustfmt-" "$filename"; then
        target/release/rustfmt $filename
    fi
done