6 if ! [ -e "$WATCH_FULL_FILE" ]; then
7 echo "No such file or directory $WATCH_FULL_FILE";
10 WATCH_DIR=`dirname "$WATCH_FULL_FILE"`
11 WATCH_FILE=`basename "$WATCH_FULL_FILE"`
13 if which inotifywait > /dev/null 2>&1; then
14 inotifywait -m -e close_write,moved_to,create $WATCH_DIR |
15 while read -r directory events filename; do
16 if [ "x$filename" = "x$WATCH_FILE" ]; then
21 CURR_TIME=$(stat -c '%Y' "$WATCH_FULL_FILE");
23 NEW_TIME=$(stat -c '%Y' "$WATCH_FULL_FILE");
24 if [ "x$NEW_TIME" != "x$CURR_TIME" ]; then