2009-01-28 15:42:14 +00:00
|
|
|
#!/bin/sh
|
2011-04-26 17:26:25 +00:00
|
|
|
# Put the version, svn revision #, and build date into the Version function in Version.pm
|
2009-01-28 15:42:14 +00:00
|
|
|
|
2013-07-26 18:07:55 +00:00
|
|
|
if [ -z "$1" ]
|
2009-01-28 15:42:14 +00:00
|
|
|
then
|
2013-07-26 18:07:55 +00:00
|
|
|
echo "modifyUtils: Error: must specify the xCAT version as an argument" >&2
|
2009-01-28 15:42:14 +00:00
|
|
|
exit
|
2012-03-07 11:37:58 +00:00
|
|
|
fi
|
|
|
|
|
2009-01-28 15:42:14 +00:00
|
|
|
VER=$1
|
2012-03-07 11:37:58 +00:00
|
|
|
|
2009-01-28 15:42:14 +00:00
|
|
|
BUILDDATE=`date`
|
2013-07-26 18:07:55 +00:00
|
|
|
#echo ". '(built $BUILDDATE)'"
|
2009-01-28 20:26:03 +00:00
|
|
|
|
|
|
|
if [ "$(uname)" = "AIX" ]
|
|
|
|
then
|
2013-07-26 18:07:55 +00:00
|
|
|
sed -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (built $BUILDDATE)'"/ xCAT/Version.pm >xCAT/Version.pm.new
|
2011-04-26 17:26:25 +00:00
|
|
|
mv xCAT/Version.pm.new xCAT/Version.pm
|
2009-01-28 20:26:03 +00:00
|
|
|
else
|
2013-05-13 07:52:27 +00:00
|
|
|
if [ -f "/etc/debian_version" ];then
|
|
|
|
FILENAME="debian/perl-xcat/opt/xcat/lib/perl/xCAT/Version.pm"
|
|
|
|
else
|
|
|
|
FILENAME="xCAT/Version.pm"
|
|
|
|
fi
|
2013-07-26 18:07:55 +00:00
|
|
|
sed -i -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (built $BUILDDATE)'"/ $FILENAME
|
2009-05-08 18:46:56 +00:00
|
|
|
fi
|