#!/bin/sh

for i in *.spec
do
cp ${i} ${i}.orig
/misc/linux/mandrake/bin/macro.sh ${i} > ${i}.new
diff ${i} ${i}.new > ${i}.patch
vi ${i}.patch
patch ${i} ${i}.patch
vi ${i}
diff -ur ${i}.orig ${i} > ${i}.diff
rpm -ba ${i} &> ${i}.out
tail ${i}.out
rm -i ${i}.new ${i}.patch ${i}.out
mv -i ${i}* ../SRPMS/* /misc/linux/mandrake/fixes/cooker/makeinstall/
done

