8098a1b4d7
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@17031 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
27 lines
777 B
Bash
Executable File
27 lines
777 B
Bash
Executable File
#!/bin/sh
|
|
# Put the version, svn revision #, and build date into the Version function in Version.pm
|
|
|
|
if [ -z "$1" ]
|
|
then
|
|
echo "modifyUtils: Error: must specify the xCAT version as an argument" >&2
|
|
exit
|
|
fi
|
|
|
|
VER=$1
|
|
|
|
BUILDDATE=`date`
|
|
#echo ". '(built $BUILDDATE)'"
|
|
|
|
if [ "$(uname)" = "AIX" ]
|
|
then
|
|
sed -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (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"/". ' (built $BUILDDATE)'"/ $FILENAME
|
|
fi
|