Files
wasmtime/format-all.sh
2017-01-25 15:57:43 -08:00

18 lines
293 B
Bash
Executable File

#!/bin/bash
# Format all sources using rustfmt.
# Exit immediately on errors.
set -e
cd $(dirname "$0")
src=$(pwd)
# Make sure we can find rustfmt.
export PATH="$PATH:$HOME/.cargo/bin"
for crate in $(find "$src" -name Cargo.toml); do
cd $(dirname "$crate")
cargo fmt -- "$@"
done