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