#!/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-UI.tar xCAT-UI #gzip -f /opt/freeware/src/packages/SOURCES/xCAT-UI.tar #cd ./xCAT-UI #rm -f /opt/freeware/src/packages/SRPMS/xCAT-UI*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-UI*rpm #rpm -ba xCAT-UI.spec #rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-UI*rpm source=/opt/freeware/src/packages echo '.svn' > /tmp/xcat-excludes tar -X /tmp/xcat-excludes -cf $source/SOURCES/xCAT-UI-$VER.tar xCAT-UI gzip -f $source/SOURCES/xCAT-UI-$VER.tar rm -f $source/SRPMS/xCAT-UI*rpm $source/RPMS/noarch/xCAT-UI*rpm rpm -ba xCAT-UI/xCAT-UI.spec #rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-UI*rpm else if [ -f /etc/redhat-release ] then pkg="redhat" else pkg="packages" fi set -x tar --exclude=.svn -czf /usr/src/$pkg/SOURCES/xCAT-UI-$VER.tar.gz xCAT-UI rm -f /usr/src/$pkg/SRPMS/xCAT-UI-$VER*rpm /usr/src/$pkg/RPMS/noarch/xCAT-UI-$VER*rpm rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-UI-$VER.tar.gz #rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-UI-$VER*rpm fi