#! /usr/bin/env bash

# Modified version of trunk/l10n-kde4/scripts/findfiles, modified to do one
# module at a time.
# This script needs to be manually merged for each major KDE SC release! To do
# this navigate to [1] and manually apply each change since last merge (only if
# applicable of course).
#
# [1] http://websvn.kde.org/trunk/l10n-kde4/scripts/findfiles?view=log

# History:
# 2010-08-01 | r1144761 | apachelogger@ubuntu.com
# 2010-02-23 | r1087304 | apachelogger@ubuntu.com
# 2008-07-31 | r822910  | jriddell@ubuntu.com

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 -o -name \*.actions \) -a \( -type f -o -type l \) >> $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
find ./runtime/kioslave/desktop -name \*.trash -print >> $filelist

dir=.
for i in `cat ./kolf/courses.list`; do echo $i >> $filelist; done
find ./bovo/themes -name themerc -print >> $filelist
find ./katomic/levels -name "*levels.dat" -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
find . -name \*.kdevtemplate -print >> $filelist

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

sort -o $filelist -u $filelist
