+ srcrpm=`rpmbuild --define "_sourcedir $pwd/$dir" -bs $spec`
+ if [ $? != 0 ]; then exit 1; fi
+ srcrpm=`echo $srcrpm | awk '{print $2}'`
+
+ # Test if all the output RPMs exist already.
+ skip=
+ if [ $SKIP_BUILT_RPMS ]; then
+ skip=1
+ baserpm=`basename $srcrpm | sed 's/\.fc[[:digit:]]*\.src\.rpm//g'`
+ for arch in $ARCHES; do
+ if [ ! -f $LOCALREPO/$DIST/$arch/RPMS/$baserpm.* ]; then
+ skip=
+ fi
+ done
+ fi
+ echo result of skip = $skip
+
+ if [ $skip ]; then
+ echo "skipping $srcrpm"
+ else
+ echo smock/smock.sh $DIST $srcrpm
+ fi