2007-12-12 15:24:27 +00:00
|
|
|
#!/bin/sh
|
2008-01-17 20:29:37 +00:00
|
|
|
|
|
|
|
OSNAME=$(uname)
|
|
|
|
|
|
|
|
if [ "$OSNAME" = "AIX" ]
|
2007-12-12 15:24:27 +00:00
|
|
|
then
|
2008-01-17 20:29:37 +00:00
|
|
|
|
|
|
|
cd `dirname $0`
|
|
|
|
echo '.svn' > /tmp/xcat-excludes
|
|
|
|
tar -X /tmp/xcat-excludes -cvf /opt/freeware/src/packages/SOURCES/postscripts.tar postscripts LICENSE.html
|
|
|
|
gzip /opt/freeware/src/packages/SOURCES/postscripts.tar
|
|
|
|
tar -X /tmp/xcat-excludes -cvf /opt/freeware/src/packages/SOURCES/templates.tar templates
|
|
|
|
gzip /opt/freeware/src/packages/SOURCES/templates.tar
|
|
|
|
#cd ./xCAT-server-2.0
|
|
|
|
rm -f /opt/freeware/src/packages/SRPMS/xCAT-2.0*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-2.0*rpm
|
|
|
|
rpm -ba xCAT.spec
|
|
|
|
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-2.0*rpm
|
|
|
|
cd -
|
|
|
|
|
2007-12-12 15:24:27 +00:00
|
|
|
else
|
2007-10-29 19:36:20 +00:00
|
|
|
|
2008-01-17 20:29:37 +00:00
|
|
|
if [ -f /etc/redhat-release ]
|
|
|
|
then
|
|
|
|
pkg="redhat"
|
|
|
|
else
|
|
|
|
pkg="packages"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd `dirname $0`
|
|
|
|
tar --exclude .svn -czvf /usr/src/$pkg/SOURCES/postscripts.tar.gz postscripts LICENSE.html
|
|
|
|
tar --exclude .svn -czvf /usr/src/$pkg/SOURCES/templates.tar.gz templates
|
|
|
|
cp xcat.conf /usr/src/$pkg/SOURCES
|
|
|
|
rm -f /usr/src/$pkg/SRPMS/xCAT-2.0*rpm /usr/src/$pkg/RPMS/*/xCAT-2.0*rpm
|
|
|
|
rpmbuild -ba xCAT.spec
|
|
|
|
cd -
|
|
|
|
fi
|