2008-02-22 21:54:44 +00:00
|
|
|
#!/bin/sh
|
2008-01-17 20:33:12 +00:00
|
|
|
|
|
|
|
OSNAME=$(uname)
|
2009-01-28 15:42:14 +00:00
|
|
|
VER=`cat Version`
|
2008-01-17 20:33:12 +00:00
|
|
|
|
|
|
|
if [ "$OSNAME" = "AIX" ]
|
|
|
|
then
|
2009-01-28 15:42:14 +00:00
|
|
|
#echo '.svn' > /tmp/xcat-excludes
|
|
|
|
#tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/xCAT-web.tar xCAT-web
|
|
|
|
#gzip -f /opt/freeware/src/packages/SOURCES/xCAT-web.tar
|
|
|
|
#cd ./xCAT-web
|
|
|
|
#rm -f /opt/freeware/src/packages/SRPMS/xCAT-web*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-web*rpm
|
|
|
|
#rpm -ba xCAT-web.spec
|
|
|
|
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-web*rpm
|
|
|
|
|
|
|
|
source=/opt/freeware/src/packages
|
2008-01-17 20:33:12 +00:00
|
|
|
echo '.svn' > /tmp/xcat-excludes
|
2009-01-28 15:42:14 +00:00
|
|
|
tar -X /tmp/xcat-excludes -cf $source/SOURCES/xCAT-web-$VER.tar xCAT-web
|
|
|
|
gzip -f $source/SOURCES/xCAT-web-$VER.tar
|
|
|
|
rm -f $source/SRPMS/xCAT-web*rpm $source/RPMS/noarch/xCAT-web*rpm
|
|
|
|
rpm -ba xCAT-web/xCAT-web.spec
|
2008-01-17 20:33:12 +00:00
|
|
|
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-web*rpm
|
|
|
|
|
|
|
|
else
|
|
|
|
if [ -f /etc/redhat-release ]
|
|
|
|
then
|
|
|
|
pkg="redhat"
|
|
|
|
else
|
|
|
|
pkg="packages"
|
|
|
|
fi
|
|
|
|
|
|
|
|
set -x
|
2009-01-28 15:42:14 +00:00
|
|
|
tar --exclude=.svn -czf /usr/src/$pkg/SOURCES/xCAT-web-$VER.tar.gz xCAT-web
|
|
|
|
rm -f /usr/src/$pkg/SRPMS/xCAT-web-$VER*rpm /usr/src/$pkg/RPMS/noarch/xCAT-web-$VER*rpm
|
|
|
|
rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-web-$VER.tar.gz
|
|
|
|
#rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-web-$VER*rpm
|
2008-01-17 20:33:12 +00:00
|
|
|
fi
|