From 56b1af7b1409737b007f135cfc6bd5e5049ac0fc Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Thu, 20 Oct 2022 09:10:45 -0400 Subject: [PATCH] Add 'reformat' rule --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index e2cd164..f67b740 100644 --- a/Makefile +++ b/Makefile @@ -16,4 +16,8 @@ packs: out/odk-detection.sql out/odk-policy.sql out/odk-incident_response.sql out/odk-packs.zip: packs cd out && zip odk-packs.zip *.conf +.PHONY: reformat +reformat: + find . -type f -name "*.sql" | perl -ne 'chomp; system("cp $$_ /tmp/fix.sql && npx sql-formatter -l sqlite /tmp/fix.sql > $$_");' + all: out/odk-packs.zip