rust/src/tools/rustfmt/bootstrap.sh
Caleb Cartwright b2d45c0d4b Add 'src/tools/rustfmt/' from commit '7872306edf'
git-subtree-dir: src/tools/rustfmt
git-subtree-mainline: e659b6de91
git-subtree-split: 7872306edf
2021-05-14 21:53:36 -05:00

17 lines
483 B
Bash
Executable file

#!/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