xcat-core/makenbrootrpm

24 lines
680 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-nbroot
tar --exclude .svn -czvf $RPMROOT/SOURCES/xcat-nbrootoverlay.tar.gz -C overlay/ .
#mv -f *.gz $RPMROOT/SOURCES
cp LICENSE.html $RPMROOT/BUILD
cp xcat-core-nbroot.spec $RPMROOT/SOURCES
cd -
rm -f $RPMROOT/SRPMS/xCAT-nbroot-$VER*rpm $RPMROOT/RPMS/*/xCAT-nbroot-$VER*rpm
rpmbuild -ba xCAT-nbroot/xcat-core-nbroot.spec --target $1