#!/bin/bash

path=/var/www/html/extras_SRPMS

ls -1 $path | while read VALUE
do
	rpmbuild --rebuild $path/$VALUE >& /tmp/logs/$VALUE.log
	if [ $? -ne 0 ]; then
		echo $VALUE >> /tmp/didnotrawbuild
	else
		rm -f /tmp/logs/$VALUE.log
	fi
done
