#!/bin/bash for dir in `find . -type d -name repodata` ; do dir=${dir%/repodata} echo "Updating repodata in $dir" cd $dir createrepo . cd - done