The script contains the following command:
rpm_list=$(ls ${src_repo_path}/*.rpm 2>/dev/null)
if [ $? -ne 0 -a ! -d ${src_repo_path}/Packages ]
then
echo "${src_repo_path} doesn't appear to be a YUM repository. Aborting..."
exit 4
fi
which makes that it fails when there is no RPM file at the root of the YUM repo. How to deal the case when they are all in subdirs (i.e., it is the case for the DELL yum repo).
The script works recursively in the repository path. Are this check really needed? If yes, can we replace the ls command by find?