On Tue, 1 Dec 2015, Programmingkid wrote:
+# Set the REVISION variable to the current svn revision or to "unknown" +REVISION := $(shell svn info .. | grep "Revision: " | cut -c11-16) +ifeq ($(REVISION),) # Try using git to find the revision number
- REVISION := $(shell git svn log --oneline -1 | cut -d '|' -f1 | cut -c2-5)
The revision number can be arbitrarily long so cutting from chars 2-5 may not always work. Maybe stripping unwanted leading and trailing chars via shell ${REVISION#r} and ${REVISION%% *} parameter expansion would work better or using sed to get numeric characters only could be more portable.
Regards, BALATON Zoltan