2008-02-22 21:54:44 +00:00
|
|
|
#!/bin/sh
|
2008-02-08 17:59:49 +00:00
|
|
|
OSNAME=$(uname)
|
2009-01-28 15:42:14 +00:00
|
|
|
VER=`cat Version`
|
2008-02-08 17:59:49 +00:00
|
|
|
|
|
|
|
if [ "$OSNAME" = "AIX" ]
|
|
|
|
then
|
2009-01-28 15:42:14 +00:00
|
|
|
#source=$PWD
|
|
|
|
#cd /opt/freeware/src/packages/SOURCES
|
|
|
|
#rm -f xCAT-rmc-$VER; ln -s $source/xCAT-rmc xCAT-rmc-$VER
|
|
|
|
#rm -f /opt/freeware/src/packages/SRPMS/xCAT-rmc*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-rmc*rpm
|
|
|
|
#echo '.svn' > /tmp/xcat-excludes
|
|
|
|
#tar -X /tmp/xcat-excludes -cf xCAT-rmc-$VER.tar xCAT-rmc-$VER
|
|
|
|
#gzip -f /opt/freeware/src/packages/SOURCES/xCAT-rmc-$VER.tar
|
|
|
|
#cd $source/xCAT-rmc
|
|
|
|
#rpm -ba xCAT-rmc.spec
|
2008-02-08 17:59:49 +00:00
|
|
|
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-rmc*rpm
|
2009-01-28 15:42:14 +00:00
|
|
|
|
|
|
|
source=/opt/freeware/src/packages
|
|
|
|
echo '.svn' > /tmp/xcat-excludes
|
|
|
|
tar -X /tmp/xcat-excludes -cf $source/SOURCES/xCAT-rmc-$VER.tar xCAT-rmc
|
|
|
|
gzip -f $source/SOURCES/xCAT-rmc-$VER.tar
|
|
|
|
rm -f /opt/freeware/src/packages/SRPMS/xCAT-rmc*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-rmc*rpm
|
|
|
|
rpm -ba xCAT-rmc/xCAT-rmc.spec
|
|
|
|
#rpm -Uvh $source/RPMS/ppc/xCAT-rmc*rpm
|
2008-02-08 17:59:49 +00:00
|
|
|
|
|
|
|
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 -czhf /usr/src/$pkg/SOURCES/xCAT-rmc-$VER.tar.gz xCAT-rmc
|
|
|
|
rm -f /usr/src/$pkg/SRPMS/xCAT-rmc-$VER*rpm /usr/src/$pkg/RPMS/noarch/xCAT-rmc-$VER*rpm
|
|
|
|
rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-rmc-$VER.tar.gz
|
|
|
|
#rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-rmc-$VER*rpm
|
2008-02-08 17:59:49 +00:00
|
|
|
fi
|