summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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