Created
April 3, 2016 15:18
-
-
Save tuxnker/4ee28e56c4343b2697815a5ae8224fd4 to your computer and use it in GitHub Desktop.
fix gulp watch on vagrant shared folder VBOXFS/SMB/NFS/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install fswatch https://github.com/emcrisostomo/fswatch | |
# | |
#Use fswatch in polling mode to listen for Created and Updated events and use touch -a to modify the attribute | |
#this will triger gulp-watch to execute and prevent a loop from fswatch | |
# when used in polling mode is going to be cpu intensive use with care | |
# | |
# | |
WATCH_PATH=/mnt/VBOX_SHARED/ | |
LOG_FILE=/var/log/fix_gulp_watch.log | |
fix_gulp_watch(){ | |
nohup /usr/local/bin/fswatch -m poll_monitor -0 --event Created --event Updated -r $WATCH_PATH |while read -d "" event; do touch -a ${event}; done > $LOG_FILE 2>&1 & | |
} | |
fix_gulp_watch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment