Files
RedBear-OS/fmt.sh
T
2024-07-21 13:56:20 +02:00

30 lines
509 B
Bash
Executable File

#!/usr/bin/bash
set -eo pipefail
function fmt() {
for dir in "$@"
do
pushd $dir
printf "\e[1;32mFormatting\e[0m $dir\n"
if [[ "$CHECK_ONLY" -eq "1" ]]; then
cargo fmt --check
else
cargo fmt
fi
popd
done
}
fmt common \
graphics/bgad \
graphics/fbcond \
graphics/vesad \
graphics/virtio-gpud \
inputd \
net/driver-network \
net/virtio-netd \
pcid \
storage/driver-block \
virtio-core