shfmt is a tool for formatting Shell files.
Create a //shfmt hook that writes the files in place.
//shfmt
Add a shfmt module to the BCR. Then use that module in this project as the source for the hook. The releases have binary downloads, follow what !4 did.
shfmt