diff options
author | Cameron Katri <me@cameronkatri.com> | 2021-04-13 15:33:30 -0400 |
---|---|---|
committer | Cameron Katri <me@cameronkatri.com> | 2021-04-13 15:33:30 -0400 |
commit | bedd1da4f697c509582246e285e628844e77e140 (patch) | |
tree | 5235e54e008d45820dad5d45a77b361f54930d8b | |
parent | 46062f71bb0dbda76cf0bde5c52bc325c97fd7a9 (diff) | |
download | bsdgames-darwin-bedd1da4f697c509582246e285e628844e77e140.tar.gz bsdgames-darwin-bedd1da4f697c509582246e285e628844e77e140.tar.zst bsdgames-darwin-bedd1da4f697c509582246e285e628844e77e140.zip |
Simplify syncing with upstream
-rw-r--r-- | Makefile | 16 | ||||
-rw-r--r-- | upstream-commit | 1 |
2 files changed, 16 insertions, 1 deletions
@@ -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 |