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