#!/bin/sh OSNAME=$(uname) VER=2.2 if [ "$OSNAME" = "AIX" ] then cd `dirname $0` echo '.svn' > /tmp/xcat-excludes echo 'upflag' >> /tmp/xcat-excludes tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/postscripts.tar postscripts LICENSE.html gzip -f /opt/freeware/src/packages/SOURCES/postscripts.tar tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/templates.tar templates gzip -f /opt/freeware/src/packages/SOURCES/templates.tar cp xcat.conf /opt/freeware/src/packages/SOURCES rm -f /opt/freeware/src/packages/SRPMS/xCAT-$VER*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-$VER*rpm rpm -ba xCAT.spec # don't install #rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-$VER*rpm cd - else if [ -f /etc/redhat-release ] then pkg="redhat" else pkg="packages" fi cd `dirname $0` tar --exclude .svn -czf /usr/src/$pkg/SOURCES/postscripts.tar.gz postscripts LICENSE.html tar --exclude .svn -czf /usr/src/$pkg/SOURCES/templates.tar.gz templates cp xcat.conf /usr/src/$pkg/SOURCES rm -f /usr/src/$pkg/SRPMS/xCAT-$VER*rpm /usr/src/$pkg/RPMS/*/xCAT-$VER*rpm if [ ! -z "$1" ]; then rpmbuild -ba xCAT.spec --target $1 else rpmbuild -ba xCAT.spec fi cd - fi