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
| #!/bin/bash | |
| echo "Start watching... Cancel -> Ctrl + C"; | |
| while true; do | |
| #fullname=`find -name "*.less"`; #all files need to be compiled | |
| #fullname=`cat watchlist`; #only in watchlist | |
| fullname=`grep -H -m 1 "^/\*@autocompile\*/" *.less | cut -d: -f1`; #only with autocompile instructions | |
| inotifywait -qe modify $fullname; | |
| for fn in $fullname; do | |
| filename="$(basename ${fn})"; | |
| path="$(dirname $fn)"; |