xcat-core/makegenesisbuilderrpm
jbjohnso 3345d3ad7c Package xCAT-genesis
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10488 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-09 18:20:18 +00:00

24 lines
686 B
Bash
Executable File

#!/bin/sh
VER=`cat Version`
rpmbuild --version > /dev/null
if [ $? -gt 0 ]
then
echo "Error: Is rpmbuild installed and working?"
exit 1
fi
RPMROOT=`rpmbuild --eval '%_topdir' xCATsn/xCATsn.spec`
if [ $? -gt 0 ]
then
echo "Could not determine rpmbuild's root"
exit 1
fi
echo "The location for rpm building is ${RPMROOT}"
cd `dirname $0`/xCAT-nbroot2
tar --exclude .svn -cjvf $RPMROOT/SOURCES/xCAT-genesis-builder.tar.bz2 .
#mv -f *.gz $RPMROOT/SOURCES
cp LICENSE.html $RPMROOT/BUILD
cp xCAT-genesis-builder.spec $RPMROOT/SOURCES
cd -
rm -f $RPMROOT/SRPMS/xCAT-genesis-builder-$VER*rpm $RPMROOT/RPMS/*/xCAT-genesis-builder-$VER*rpm
rpmbuild -ba xCAT-nbroot2/xCAT-genesis-builder.spec