e12bb46487
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16246 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
40 lines
1.1 KiB
Bash
Executable File
40 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
# Put the version, svn revision #, and build date into the Version function in Version.pm
|
|
|
|
if [ -z "$2" ]
|
|
then
|
|
echo "modifyUtils: Error: must specify the xCAT version and svn revision number as arguments" >&2
|
|
exit
|
|
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)'"
|
|
|
|
if [ "$(uname)" = "AIX" ]
|
|
then
|
|
sed -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (${SVNREF}built $BUILDDATE)'"/ xCAT/Version.pm >xCAT/Version.pm.new
|
|
mv xCAT/Version.pm.new xCAT/Version.pm
|
|
else
|
|
if [ -f "/etc/debian_version" ];then
|
|
FILENAME="debian/perl-xcat/opt/xcat/lib/perl/xCAT/Version.pm"
|
|
else
|
|
FILENAME="xCAT/Version.pm"
|
|
fi
|
|
sed -i -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (${SVNREF}built $BUILDDATE)'"/ $FILENAME
|
|
fi
|