Fixed bug 3496915: svn revision # not showing for -v flags

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11780 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
bp-sawyers
2012-03-07 11:38:33 +00:00
parent d8495d188f
commit cc332eaa90
2 changed files with 21 additions and 16 deletions
+18 -15
View File
@@ -1,24 +1,27 @@
#!/bin/sh
# Put the version, svn revision #, and build date into the Version function in Version.pm
if [ -z "$1" ]
if [ -z "$2" ]
then
echo "modifyVersion: Error: must specify the xCAT version as an argument!"
echo "modifyUtils: Error: must specify the xCAT version and svn revision number as arguments" >&2
exit
fi
VER=$1
SVNINFO=`svn info 2>/dev/null|grep Revision`
#/bin/echo -e $SVNINFO
if [ $? -ne 0 -a -f .svninfo ]; then
SVNINFO=`cat .svninfo 2>/dev/null|grep Revision`
fi
if [ $? -eq 0 ]
then
SVNREF="svn r"`echo $SVNINFO|awk '{print $2}'`", "
else
SVNREF=""
fi
VER=$1
SVNREF="svn r$2, "
#SVNINFO=`svn info 2>/dev/null|grep Revision`
#/bin/echo -e $SVNINFO
#if [ $? -ne 0 -a -f .svninfo ]; then
# SVNINFO=`cat .svninfo 2>/dev/null|grep Revision`
#fi
#if [ $? -eq 0 ]
# then
# SVNREF="svn r"`echo $SVNINFO|awk '{print $2}'`", "
# else
# SVNREF=""
# fi
BUILDDATE=`date`
#echo ". '(${SVNREF}built $BUILDDATE)'"
+3 -1
View File
@@ -22,6 +22,8 @@ Provides: perl-xCAT = %{epoch}:%{version}
Provides perl xCAT libraries for core functionality. Required for all xCAT installations.
Includes xCAT::Table, xCAT::NodeRange, among others.
%define svninfo %(svn info | grep Revision | awk '{print $2}')
%prep
%setup -q -n perl-xCAT
%build
@@ -30,7 +32,7 @@ Includes xCAT::Table, xCAT::NodeRange, among others.
# as it is in svn.
# Modify the Version() function in xCAT/Utils.pm to automatically have the correct version
./modifyUtils %{version}
./modifyUtils %{version} %{svninfo}
# Build the pod version of the man pages for each DB table. It puts them in the man5 and man7 subdirs.
# Then convert the pods to man pages and html pages.