From 33e7a2609e7bb3ba620c3fdd6906193a3a8aa071 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Wed, 5 Oct 2011 20:20:13 +0200 Subject: [PATCH] Fix package version display. --- tools/make-functions | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/make-functions b/tools/make-functions index b4de26a17..e693ff94f 100644 --- a/tools/make-functions +++ b/tools/make-functions @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2010 IPFire Team # +# Copyright (C) 2007-2011 IPFire Team # # # # 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() { - 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="?" + 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 -- 2.39.2