2008-02-22 21:54:44 +00:00
|
|
|
#!/bin/sh
|
2007-10-26 22:44:33 +00:00
|
|
|
|
|
|
|
OSNAME=$(uname)
|
2009-01-08 19:09:44 +00:00
|
|
|
VER="2.2"
|
2007-10-26 22:44:33 +00:00
|
|
|
|
|
|
|
if [ "$OSNAME" = "AIX" ]
|
|
|
|
then
|
|
|
|
|
2008-06-03 19:34:04 +00:00
|
|
|
source=$PWD
|
|
|
|
cd /opt/freeware/src/packages/SOURCES
|
|
|
|
rm -f xCAT-client-$VER; ln -s $source/xCAT-client xCAT-client-$VER
|
|
|
|
rm -f /opt/freeware/src/packages/SRPMS/xCAT-client*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-client*rpm
|
|
|
|
echo '.svn' > /tmp/xcat-excludes
|
|
|
|
tar -X /tmp/xcat-excludes -cf xCAT-client-$VER.tar xCAT-client-$VER
|
|
|
|
gzip -f /opt/freeware/src/packages/SOURCES/xCAT-client-$VER.tar
|
|
|
|
cd $source/xCAT-client
|
|
|
|
rpm -ba xCAT-client.spec
|
2007-10-26 22:44:33 +00:00
|
|
|
else
|
|
|
|
if [ -f /etc/redhat-release ]
|
|
|
|
then
|
|
|
|
pkg="redhat"
|
|
|
|
else
|
|
|
|
pkg="packages"
|
|
|
|
fi
|
2008-06-03 19:34:04 +00:00
|
|
|
source=$PWD
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2008-06-03 19:34:04 +00:00
|
|
|
# Trying to avoid having the version on the xCAT-client dir name in svn
|
|
|
|
set -x
|
|
|
|
cd /usr/src/$pkg/SOURCES
|
|
|
|
rm -f xCAT-client-$VER; ln -s $source/xCAT-client xCAT-client-$VER # have to make tar think it is in xCAT-client-2.1
|
|
|
|
rm -f xCAT-client-$VER.tar.gz
|
|
|
|
tar -czhf xCAT-client-$VER.tar.gz --exclude=.svn --exclude=.project xCAT-client-$VER
|
2008-06-03 15:03:32 +00:00
|
|
|
rm -f /usr/src/$pkg/SRPMS/xCAT-client-$VER*rpm /usr/src/$pkg/RPMS/noarch/xCAT-client-$VER*rpm
|
2008-06-03 19:34:04 +00:00
|
|
|
rpmbuild -ta xCAT-client-$VER.tar.gz
|
2007-10-26 22:44:33 +00:00
|
|
|
fi
|