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