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

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11779 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
bp-sawyers 2012-03-07 11:37:58 +00:00
parent a29b320471
commit 49baf3f4d2
2 changed files with 20 additions and 16 deletions

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)'"

View File

@ -24,6 +24,7 @@ Provides perl xCAT libraries for core functionality. Required for all xCAT inst
Includes xCAT::Table, xCAT::NodeRange, among others.
%define zvm %(if [ "$zvm" = "1" ];then echo 1; else echo 0; fi)
%define svninfo %(svn info | grep Revision | awk '{print $2}')
%prep
%setup -q -n perl-xCAT
@ -33,7 +34,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.