]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Fix package version display.
authorArne Fitzenreiter <arne_f@ipfire.org>
Wed, 5 Oct 2011 18:20:13 +0000 (20:20 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Wed, 5 Oct 2011 18:20:13 +0000 (20:20 +0200)
tools/make-functions

index b4de26a170c79a5dc7274e98551d00703b23af96..e693ff94f9ab21136d31bee6ce61cf5050908327 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2010  IPFire Team  <info@ipfire.org>                          #
+# Copyright (C) 2007-2011  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -195,12 +195,14 @@ beautify()
 
 get_pkg_ver()
 {
 
 get_pkg_ver()
 {
-       PKG_VER=`grep ^VER $1 | awk '{print $3}'`
+       PKG_VER=`grep -E "^VER |^VER=|^VER      " $1 | awk '{print $3}'`
 
        if [ -z $PKG_VER ]; then
                PKG_VER=`grep "Exp " $1 | awk '{print $4}'`
        fi
 
        if [ -z $PKG_VER ]; then
                PKG_VER=`grep "Exp " $1 | awk '{print $4}'`
        fi
-
+       if [ -z $PKG_VER ]; then
+               PKG_VER="?"
+       fi
        if [ ${#PKG_VER} -gt $VER_WIDTH ]; then
                # If a package version number is greater than $VER_WIDTH, we keep the first 4 characters
                # and replace enough characters to fit the resulting string on the screen.  We'll replace
        if [ ${#PKG_VER} -gt $VER_WIDTH ]; then
                # If a package version number is greater than $VER_WIDTH, we keep the first 4 characters
                # and replace enough characters to fit the resulting string on the screen.  We'll replace