populate source_files table
This commit is contained in:
parent
e1d592a964
commit
00635b3ce9
19
atom
19
atom
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user