add svn revision to /etc/banner
authorFelix Fietkau <nbd@openwrt.org>
Sat, 22 Oct 2005 16:34:35 +0000 (16:34 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 22 Oct 2005 16:34:35 +0000 (16:34 +0000)
SVN-Revision: 2246

openwrt/package/base-files/Makefile
openwrt/package/base-files/default/etc/banner

index 78e1f0a5348b3f93a262fcb3141b69b72d48137b..c1dd8c69fc289ed85778678fd7a9784ac5879b78 100644 (file)
@@ -6,6 +6,11 @@ PKG_NAME:=base-files
 PKG_RELEASE:=2
 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files
 
+REV:=${shell svn info | grep Revision | cut -d ' ' -f 2}
+ifeq ($(REV),)
+REV:=0
+endif
+
 include $(TOPDIR)/package/rules.mk
 
 IDIR_BASE:=$(PKG_BUILD_DIR)/base-files
@@ -34,6 +39,7 @@ $(PKG_BUILD_DIR)/.built:
 $(IPKG_BASE):
        $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_BASE) ipkg/$(PKG_NAME).control $(PKG_RELEASE) $(ARCH)
        cp -a ./default/* $(IDIR_BASE)
+       $(SED) 's,$$R,r$(REV),g' $(IDIR_BASE)/etc/banner
        mkdir -p $(IDIR_BASE)/jffs
        mkdir -p $(IDIR_BASE)/dev
        mkdir -p $(IDIR_BASE)/proc
index 610c0f3b5e224dc0706fec6e4559b22a80d33cb9..02da7e8e20e14afa676dd79329c814aa7af7b1db 100644 (file)
@@ -3,5 +3,5 @@
  |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
  |_______||   __|_____|__|__||________||__|  |____|
           |__| W I R E L E S S   F R E E D O M
-          
-         bleeding edge ;)
+  
+         bleeding edge, $R ;)