summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-04-13 15:33:30 -0400
committerCameron Katri <me@cameronkatri.com>2021-04-13 15:33:30 -0400
commitbedd1da4f697c509582246e285e628844e77e140 (patch)
tree5235e54e008d45820dad5d45a77b361f54930d8b
parent46062f71bb0dbda76cf0bde5c52bc325c97fd7a9 (diff)
downloadbsdgames-darwin-bedd1da4f697c509582246e285e628844e77e140.tar.gz
bsdgames-darwin-bedd1da4f697c509582246e285e628844e77e140.tar.zst
bsdgames-darwin-bedd1da4f697c509582246e285e628844e77e140.zip
Simplify syncing with upstream
-rw-r--r--Makefile16
-rw-r--r--upstream-commit1
2 files changed, 16 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b3c9d43e..fbb0be58 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,21 @@ config.h:
@echo "#define LOCALSTATEDIR \"$(LOCALSTATEDIR)\"" >> config.h
@echo "#define SYSCONFDIR \"$(SYSCONFDIR)\"" >> config.h
+update:
+ TEMP=$$(mktemp -d); \
+ cd ~/Documents/BSD/NetBSD; \
+ git format-patch -o $$TEMP $(shell cat upstream-commit) games; \
+ git rev-list HEAD -1 games/ > $(ROOT)/upstream-commit; \
+ cd $(ROOT); \
+ for patch in $$TEMP/*.patch; do \
+ if [ "$$(filterdiff -x '*/Makefile' --strip=1 $$patch --clean)" = "" ]; then \
+ echo "Skipping $$(basename $$patch) because it's empty"; \
+ else \
+ filterdiff -x '*/Makefile' --strip=1 $$patch | git am; \
+ fi; \
+ done
+
clean:
rm -f config.h
-.PHONY: $(TOPTARGETS) $(SUBDIR)
+.PHONY: $(TOPTARGETS) $(SUBDIR) update
diff --git a/upstream-commit b/upstream-commit
new file mode 100644
index 00000000..f9e4e775
--- /dev/null
+++ b/upstream-commit
@@ -0,0 +1 @@
+349df3fc42d56c343bcc12b6c33784a3492395c4