2008-02-22 21:54:44 +00:00
|
|
|
#!/bin/sh
|
2008-02-08 17:59:49 +00:00
|
|
|
OSNAME=$(uname)
|
2009-01-07 18:18:24 +00:00
|
|
|
version='2.1.1'
|
2008-02-08 17:59:49 +00:00
|
|
|
|
|
|
|
if [ "$OSNAME" = "AIX" ]
|
|
|
|
then
|
2008-02-08 18:43:52 +00:00
|
|
|
source=$PWD
|
|
|
|
cd /opt/freeware/src/packages/SOURCES
|
|
|
|
rm -f xCAT-rmc-$version; ln -s $source/xCAT-rmc xCAT-rmc-$version
|
2008-02-08 17:59:49 +00:00
|
|
|
rm -f /opt/freeware/src/packages/SRPMS/xCAT-rmc*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-rmc*rpm
|
2008-02-08 18:43:52 +00:00
|
|
|
echo '.svn' > /tmp/xcat-excludes
|
2008-02-27 19:52:07 +00:00
|
|
|
tar -X /tmp/xcat-excludes -cf xCAT-rmc-$version.tar xCAT-rmc-$version
|
2008-04-05 14:53:35 +00:00
|
|
|
gzip -f /opt/freeware/src/packages/SOURCES/xCAT-rmc-$version.tar
|
2008-02-08 18:43:52 +00:00
|
|
|
cd $source/xCAT-rmc
|
2008-02-08 17:59:49 +00:00
|
|
|
rpm -ba xCAT-rmc.spec
|
|
|
|
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-rmc*rpm
|
|
|
|
|
|
|
|
else
|
|
|
|
if [ -f /etc/redhat-release ]
|
|
|
|
then
|
|
|
|
pkg="redhat"
|
|
|
|
else
|
|
|
|
pkg="packages"
|
|
|
|
fi
|
|
|
|
source=$PWD
|
|
|
|
|
2008-06-03 19:34:04 +00:00
|
|
|
# Trying to avoid having the version on the xCAT-rmc dir name in svn
|
2008-02-08 17:59:49 +00:00
|
|
|
set -x
|
|
|
|
cd /usr/src/$pkg/SOURCES
|
|
|
|
rm -f xCAT-rmc-$version; ln -s $source/xCAT-rmc xCAT-rmc-$version # have to make tar think it is in xCAT-rmc-2.0
|
|
|
|
rm -f xCAT-rmc-$version.tar.gz
|
|
|
|
tar -czhf xCAT-rmc-$version.tar.gz --exclude=.svn --exclude=.project xCAT-rmc-$version
|
|
|
|
rm -f /usr/src/$pkg/SRPMS/xCAT-rmc-$version*rpm /usr/src/$pkg/RPMS/noarch/xCAT-rmc-$version*rpm
|
|
|
|
rpmbuild -ta xCAT-rmc-$version.tar.gz
|
|
|
|
#rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-rmc-$version*rpm
|
|
|
|
fi
|