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-01-17 20:33:12 +00:00
|
|
|
|
2008-06-06 21:41:09 +00:00
|
|
|
echo '.svn' > /tmp/xcat-excludes
|
|
|
|
tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/xCAT-server-$VER.tar xCAT-server
|
|
|
|
gzip -f /opt/freeware/src/packages/SOURCES/xCAT-server-$VER.tar
|
|
|
|
cd ./xCAT-server
|
|
|
|
rm -f /opt/freeware/src/packages/SRPMS/xCAT-server-$VER*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-server-$VER*rpm
|
|
|
|
rpm -ba xCAT-server.spec
|
|
|
|
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-server-$VER*rpm
|
|
|
|
|
2007-10-26 22:44:33 +00:00
|
|
|
else
|
2008-06-06 21:41:09 +00:00
|
|
|
|
2007-10-26 22:44:33 +00:00
|
|
|
if [ -f /etc/redhat-release ]
|
|
|
|
then
|
|
|
|
pkg="redhat"
|
|
|
|
else
|
|
|
|
pkg="packages"
|
|
|
|
fi
|
|
|
|
|
2008-06-06 21:41:09 +00:00
|
|
|
tar --exclude .svn -czf /usr/src/$pkg/SOURCES/xCAT-server-$VER.tar.gz xCAT-server;
|
2008-06-03 15:03:32 +00:00
|
|
|
rm -f /usr/src/$pkg/SRPMS/xCAT-server-$VER*rpm /usr/src/$pkg/RPMS/noarch/xCAT-server-$VER*rpm
|
2008-06-06 21:41:09 +00:00
|
|
|
rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-server-$VER.tar.gz ;
|
|
|
|
#rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-server-$VER*rpm
|
2007-10-26 22:44:33 +00:00
|
|
|
fi
|