diff --git a/perl-xCAT/modifyUtils b/perl-xCAT/modifyUtils index 8fbd74fb5..c336e0d96 100755 --- a/perl-xCAT/modifyUtils +++ b/perl-xCAT/modifyUtils @@ -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)'" diff --git a/perl-xCAT/perl-xCAT.spec b/perl-xCAT/perl-xCAT.spec index f89ec07db..faa009ba4 100644 --- a/perl-xCAT/perl-xCAT.spec +++ b/perl-xCAT/perl-xCAT.spec @@ -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.