populate source_files table

This commit is contained in:
Vincent Riquer 2013-02-25 17:33:36 +01:00
parent e1d592a964
commit 00635b3ce9

19
atom
View File

@ -417,7 +417,22 @@ InsertOrUpdate() {
}
getFiles() {
:
scantime=$(date +%s)
while read time size filename
do
sourcefileid=$(
InsertOrUpdate source_files \
last_change ${time%.*} \
size $size \
last_seen $scantime \
<<-EOWhere
filename $filename
EOWhere
)
echo $sourcefileid "$filename"
done < <(
find "$sourcepath" -type f -printf "%T@ %s %P\n"
)
}
getType() {
@ -549,6 +564,8 @@ done
openDatabase
getFiles
closeDatabase
# vim:set ts=8 sw=8: