#!/bin/bash

for pkg in `find ./extras -name Packages`
do
  n=`echo $pkg|awk -F"/" '{print $2}'`
  v=`echo $pkg|awk -F"/" '{print $3}'`
  for i in `find $pkg|grep rpm`
  do
    n1=`rpm -qi $i|grep "Name        :"|head -1|awk '{print $NF}'`
    v1=`rpm -qi $i|grep "Version     :"|head -1|awk '{print $NF}'`
    echo $n1-$v1 >> ~/clean/$n/$n-$v.list
  done
done
	  
