#!/bin/sh cd /mirrors/mitel/devel/repo/SRPMS FAILED="" for file in e-smith* do if [ -f /builds/rpms/SRPMS/$file ] then echo "Already built: $file" continue fi echo "Building: $file" if rpmbuild --rebuild $file then cp -p $file /builds/rpms/SRPMS else echo "FAILED: $file" FAILED="$FAILED $file" fi done echo "Failed to build: $FAILED"