From ebb978003664c350f5f90d3cb6c2e83fba26ded9 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Fri, 10 Feb 2023 10:33:04 -0500 Subject: [PATCH] Makefile: Add reformat-updates target --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 5e05a68..500761c 100644 --- a/Makefile +++ b/Makefile @@ -24,4 +24,8 @@ out/odk-packs.zip: packs reformat: find . -type f -name "*.sql" | perl -ne 'chomp; system("cp $$_ /tmp/fix.sql && npx sql-formatter -l sqlite /tmp/fix.sql > $$_");' +.PHONY: reformat-updates +reformat-updates: + git status -s | awk '{ print $$2 }' | grep ".sql" | perl -ne 'chomp; system("cp $$_ /tmp/fix.sql && npx sql-formatter -l sqlite /tmp/fix.sql > $$_");' + all: out/odk-packs.zip