#! /usr/bin/env bash

# modified version of trunk/l10n-kde4/scripts/findfiles, modified to do one module at a time

if test -z "$1"; then
  echo "call: $0 <filename>"
  exit
fi

filelist=$1

rm -f "$filelist"_* $filelist

: > $filelist

find . \( -name \*.directory -o -name \*.desktop -o -name \*.kimap -o -name \*.themerc -o -name \*.kcsrc -o -name \*.setdlg -o -name index.theme -o -name \*.notifyrc -o -name \*.protocol -o -name \*.profile \) >> $filelist

find ./apps/konqueror ./kdesktop -name .svn -prune , -name "directory.*" -type f >> $filelist 
find ./runtime/drkonqi -name "*rc" -print >> $filelist
# find $BASEDIR/`get_path kdelibs`/kimgio -name \*.kimgio -print >> $filelist
find ./workspace/khotkeys -name \*.khotkeys -print >> $filelist
find ./workspace/kwin -name \*.kwinrules -print >> $filelist

dir=.
for i in `cat ./kolf/courses.list`; do echo $i >> $filelist; done
find ./bovo/themes -name themerc -print >> $filelist

find ./amor/data -name \*rc -print >> $filelist
find ./kdeprint -name \*.print -print >> $filelist
find ./ -name \*.kksrc -print >> $filelist
find ./kopete -name \*.plugin -print >> $filelist
find . -name \*.kdevtemplate -print >> $filelist
find . -name \*.kdevtemplate -print >> $filelist

# digikam's .desktop.cmake files
find ./digikam -name \*.desktop.cmake -print >> $filelist

sort -o $filelist -u $filelist
