#!/bin/bash set -e for d in qml images do ( cd $d echo "<RCC>" echo " <qresource prefix=\"/\">" find * -type f \! -name '*.qrc' -a \! -name '*~' -a \! -name '*.new' -printf " <file>%p</file>\n" echo " </qresource>" echo "</RCC>" ) >$d/$d.qrc done