summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMatt Hunter <m@lfurio.us>2026-02-21 01:52:45 -0500
committerMatt Hunter <m@lfurio.us>2026-02-22 18:22:05 -0500
commit0b96dee27bff6276f0f435c52327eecbbd0aa4e5 (patch)
tree3f27d76418dd5790d413afd44b10fc048d2fba6c /Makefile
parent0e9f8c84a7f8c96b63837361c6215eef8123034a (diff)
downloadgit-sonar-0b96dee27bff6276f0f435c52327eecbbd0aa4e5.tar.gz
git-sonar-0b96dee27bff6276f0f435c52327eecbbd0aa4e5.zip
Add git-precheck script
This is an alternative entrypoint primarily intended for use in other scripts. The purpose of git-precheck is to easily determine the state of a git repository before going on to perform additional, possibly disruptive work. git-precheck tries to cover as many bases as possible - odd cases like 'merge in progress', 'cherry-pick in progress', etc. By default, we only exit success (0) if we are in a repo that is completely clean (no file modifications or untracked files present) and has no ongoing operation. Signed-off-by: Matt Hunter <m@lfurio.us>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 95538ac..6edd7f4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-SOURCE=git-sonar
+SOURCE=git-sonar git-precheck
PREFIX?=/usr/local
PWD=$(shell pwd)
@@ -21,7 +21,9 @@ install: $(SOURCE)
mkdir -p $(PREFIX)/bin
install -m 755 $(SOURCE) $(PREFIX)/bin
+# Link each file separately since the full PWD is needed
develop: $(SOURCE)
@echo 'Symlinking in' $(PREFIX)/bin '...'
mkdir -p $(PREFIX)/bin
- ln -sf $(PWD)/$(SOURCE) $(PREFIX)/bin
+ ln -sf $(PWD)/git-sonar $(PREFIX)/bin
+ ln -sf $(PWD)/git-precheck $(PREFIX)/bin