File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,12 @@ SETTLE_DOWN_CHECK="5 seconds ago"
5
5
6
6
7
7
inotifywait --monitor " $1 " --event create --event moved_to --event modify --exclude ' /[.@]' --format ' %w%f' $INOTIFYWAIT_OPTS | stdbuf -oL uniq | while read -r FILE; do
8
+ TODAY=" $( date ' +%Y/%m/%d %H:%M:%S %Z' ) "
9
+
8
10
echo " [INOTIFY] $FILE "
9
11
10
12
# make sure to inform the user that we are waiting for things to settle down
11
- echo " Waiting $SETTLE_DOWN_TIME seconds for changes to settle down..."
13
+ echo " [ $TODAY ] Waiting $SETTLE_DOWN_TIME seconds for changes to settle down..."
12
14
13
15
# file may yield inode/x-empty for new files
14
16
sleep " $SETTLE_DOWN_TIME "
@@ -17,7 +19,7 @@ inotifywait --monitor "$1" --event create --event moved_to --event modify --excl
17
19
RECENTLY_MODIFIED_FILES=" $( find " $1 " -type f -newermt " $SETTLE_DOWN_CHECK " -not -path ' */[.@]*' -print -quit) "
18
20
19
21
if [ -n " $RECENTLY_MODIFIED_FILES " ]; then
20
- echo " $RECENTLY_MODIFIED_FILES was modified less than $SETTLE_DOWN_CHECK "
22
+ echo " [ $TODAY ] $RECENTLY_MODIFIED_FILES was modified less than $SETTLE_DOWN_CHECK "
21
23
echo " Processing deferred until next change..."
22
24
continue
23
25
fi
You can’t perform that action at this time.
0 commit comments