From 8a3f7143bc718a8813d82ff4fc6e0e607a6f990f Mon Sep 17 00:00:00 2001 From: osbm Date: Sat, 12 Oct 2024 11:58:35 +0300 Subject: [PATCH] add makefile --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c4264f2 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ + + +check-status: + @if [ -n "$$(git status --porcelain)" ]; then \ + echo "Error: You have untracked or modified files. Please commit or stash your changes."; \ + exit 1; \ + fi + echo Git is clean. :) + +build: check-status + NIXOS_LABEL := $(shell git rev-parse HEAD) + sudo nixos-rebuild switch --flake .