xcat-core/maketestrpm
ellen56 a05837bdca new files for xCAT test
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7514 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-09-20 08:10:57 +00:00

28 lines
793 B
Bash
Executable File

#!/bin/sh
OSNAME=$(uname)
VER=`cat Version`
if [ "$OSNAME" = "AIX" ]
then
source=/opt/freeware/src/packages
echo '.svn' > /tmp/xcat-excludes
tar -X /tmp/xcat-excludes -cf $source/SOURCES/xCAT-test-$VER.tar xCAT-test
gzip -f $source/SOURCES/xCAT-test-$VER.tar
rm -f $source/SRPMS/xCAT-test*rpm $source/RPMS/ppc/xCAT-test*rpm
rpm -ba xCAT-test/xCAT-test.spec
#rpm -ta $source/SOURCES/xCAT-test-$VER.tar.gz
else
if [ -f /etc/redhat-release ]
then
pkg="redhat"
else
pkg="packages"
fi
set -x
tar --exclude=.svn -czhf /usr/src/$pkg/SOURCES/xCAT-test-$VER.tar.gz xCAT-test
rm -f /usr/src/$pkg/SRPMS/xCAT-test-$VER*rpm /usr/src/$pkg/RPMS/noarch/xCAT-test-$VER*rpm
rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-test-$VER.tar.gz
fi