yes a branch would be good - fixes ...
This commit is contained in:
parent
3ff5bcb9a9
commit
50eef4fbd5
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# @author 6543
|
||||
# @version 1.0
|
||||
# @version 1.1
|
||||
# @date 2019-05-11
|
||||
|
||||
## Options/Parameter
|
||||
@ -78,7 +78,7 @@ function main() {
|
||||
grep -vf "$list_tmp/indb" "$list_tmp/exist" > "$list_tmp/new"
|
||||
|
||||
#all IDs wich an old check date:
|
||||
db_query "SELECT ID FROM File Where TTCheck < '$DATE' OR TTCheck IS NULL;" | while read line; do
|
||||
db_query "SELECT ID FROM File Where (TTCheck < '$DATE' OR TTCheck IS NULL) AND (TTSync=$TTSYNC_EXIST OR TTSync=$TTSYNC_BACKUP);" | while read line; do
|
||||
#for each ID with an old check date ...
|
||||
ID=$line
|
||||
[ $DEBUG == $TRUE ] && echo "Progress ID: $ID" >&2
|
||||
@ -86,7 +86,7 @@ function main() {
|
||||
if [ -f "$FILE" ]; then
|
||||
SIZE=$(db_query "SELECT Size FROM File WHERE ID=$ID;")
|
||||
SIZE_new="$(file_size "$FILE")"
|
||||
[ "$SIZE" != "$SIZE_new" ] && {
|
||||
if [ "$SIZE" != "$SIZE_new" ]; then
|
||||
echo "FILE CHANGE: $FILE"
|
||||
if [ "0" == "$SIZE_new" ]; then
|
||||
#file exist but to smal
|
||||
@ -107,7 +107,10 @@ function main() {
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
else
|
||||
#add timestamp that nothing has changed
|
||||
db_query "UPDATE File SET TTCheck='$DATE' WHERE ID=$ID;"
|
||||
fi
|
||||
else
|
||||
# file dont exist
|
||||
echo "FILE DEL/MV: $FILE"
|
||||
|
Loading…
Reference in New Issue
Block a user