xcat-core/makeclientrpm

30 lines
700 B
Bash
Executable File

#!/bin/ksh
OSNAME=$(uname)
if [ "$OSNAME" = "AIX" ]
then
tar -cvf xCAT-client-2.0.tar xCAT-client-2.0
gzip xCAT-client-2.0.tar
cp xCAT-client-2.0.tar.gz /opt/freeware/src/packages/SOURCES
cd ./xCAT-client-2.0
rm /opt/freeware/src/packages/RPMS/ppc/xCAT-client-2.0*rpm
rpm -ba xCAT-client.spec
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-client-2.0*rpm
else
if [ -f /etc/redhat-release ]
then
pkg="redhat"
else
pkg="packages"
fi
tar --exclude .svn -czvf xCAT-client-2.0.tar.gz xCAT-client-2.0;
rm /usr/src/$pkg/RPMS/noarch/xCAT-client-2.0*rpm
rpmbuild -ta xCAT-client-2.0.tar.gz ;
#rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-client-2.0*rpm
fi