[2/2] batctl: Remove subversion/svk revision information

Message ID 1301587899-9449-3-git-send-email-sven@narfation.org (mailing list archive)
State Accepted, archived
Commit 88b75a3416dec00a1a43e690491278abee511d3e
Headers

Commit Message

Sven Eckelmann March 31, 2011, 4:11 p.m. UTC
  The current version of batctl cannot be obtained from subversion or svk
anymore. It is unnecessary to provide the functionality to retrieve the
current revision using these tools.

We only have to differenciate between git checkout and official release.
We cannot detect a git snapshot and thus the distribution has to provide
the REVISION variable for snapshots.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 Makefile |   20 ++------------------
 1 files changed, 2 insertions(+), 18 deletions(-)
  

Comments

Marek Lindner April 1, 2011, 7:45 p.m. UTC | #1
On Thursday 31 March 2011 18:11:39 Sven Eckelmann wrote:
> The current version of batctl cannot be obtained from subversion or svk
> anymore. It is unnecessary to provide the functionality to retrieve the
> current revision using these tools.
> 
> We only have to differenciate between git checkout and official release.
> We cannot detect a git snapshot and thus the distribution has to provide
> the REVISION variable for snapshots.

Applied in revision g88b75a3.

Thanks,
Marek
  

Patch

diff --git a/Makefile b/Makefile
index b5b4e2b..217a00a 100644
--- a/Makefile
+++ b/Makefile
@@ -47,24 +47,8 @@  PACKAGE_NAME = batctl
 BINARY_NAME = batctl
 SOURCE_VERSION_HEADER = main.h
 
-REVISION= $(shell	if [ -d .svn ]; then \
-				if which svn > /dev/null; then \
-					echo rv$$(svn info | grep "Rev:" | sed -e '1p' -n | awk '{print $$4}'); \
-				else \
-					echo "[unknown]"; \
-				fi; \
-			elif [ -d .git ]; then \
-				if which git > /dev/null; then \
-					echo $$(git describe --always --dirty 2> /dev/null); \
-				else \
-					echo "[unknown]"; \
-				fi; \
-			elif [ -d ~/.svk ]; then \
-				if which svk > /dev/null; then \
-					echo rv$$(svk info | grep "Mirrored From" | awk '{print $$5}'); \
-				else \
-					echo "[unknown]"; \
-				fi; \
+REVISION= $(shell	if [ -d .git ]; then \
+				echo $$(git describe --always --dirty 2> /dev/null || echo "[unknown]"); \
 			fi)
 
 REVISION_VERSION =\"\ $(REVISION)\"