A while back [1] it was noted zsh's $OSTYPE is out of sync with the OS
version. The below patch uses $(OSrev) to automatically bump REVISION
when the OS version changes. In the case a normal REVISION bump is
needed, the constant can be decremented. When updated to a new release,
the constant should be updated to the current OSrev value (which means
REVISION will start at 0 not blank, but that seems fairly unimportant.)

Thoughts or other suggestions?

1: https://marc.info/?l=openbsd-ports&m=160940571013139&w=2


diff --git Makefile Makefile
index 7d9cee17bd6..02b28a7bb19 100644
--- Makefile
+++ Makefile
@@ -3,7 +3,8 @@
 COMMENT=       Z shell, Bourne shell-compatible
 
 V=             5.8
-REVISION =     0
+# Keep $OSTYPE up to date
+REVISION !=    expr $(OSrev) - 68
 DISTNAME=      zsh-$V
 CATEGORIES=    shells
 

Reply via email to