#!/bin/bash DEST_PATH="/data/repository/opensuse/102" set -x find $DEST_PATH/* -type d -name repodata | while read dir; do if [[ ${dir} == */suse* ]]; then continue; fi; pushd "$dir/.."; createrepo -q -c .cache -C .; popd; done;