2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-09-01 15:58:28 +00:00
Files
xcat-core/makegenesisbuilderrpm
2016-12-14 09:18:54 -05:00

27 lines
817 B
Bash
Executable File

#!/bin/sh
VER=`git describe --tags`
VER=${VER/-/.POST}
VER=${VER/-/.}
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}"
echo $VER
cd `dirname $0`/xCAT-genesis-builder
tar --exclude .svn --exclude .*.sw* -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-genesis-builder/xCAT-genesis-builder.spec --define "version $VER" --define "release 1"