From 742a7f0bb112c5b70888ea3611686beb6cabdc4b Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Wed, 14 Feb 2024 17:33:24 +0100 Subject: [PATCH] Sql init script --- Makefile | 19 +++++++++++++++++++ database.sql | 0 2 files changed, 19 insertions(+) create mode 100644 Makefile create mode 100644 database.sql diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7f816f1 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +# Define variables +DB_NAME := lab.db3 +SQL_SCRIPT := database.sql + +# Define targets and their dependencies +all: init_db + +init_db: $(DB_NAME) + +# Target to create the database +$(DB_NAME): $(SQL_SCRIPT) + sqlite3 $@ < $< + +# Clean target +clean: + rm -f $(DB_NAME) + +# Phony targets +.PHONY: all init_db clean diff --git a/database.sql b/database.sql new file mode 100644 index 0000000..e69de29