Skip to content

Instantly share code, notes, and snippets.

@antila
Created November 21, 2013 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antila/7584281 to your computer and use it in GitHub Desktop.
Save antila/7584281 to your computer and use it in GitHub Desktop.
Assetic isn't avare of file changes in files @imported in LESS/SASS. This hack touches the main theme file that imports them, to force a recompile. See https://github.com/kriswallsmith/assetic/issues/79
#!/bin/sh
hash inotifywait 2>/dev/null || { echo >&2 "I require package inotify-tools but it's not installed. Try: apt-get install inotify-tools"; exit 1; }
while true;
echo "Waiting for changes in .less-files."
do N=`find src -name "*.less" `;
inotifywait -qe modify $N;
echo "Touching: src/Cos/Bundle/CosBundle/Resources/public/themes/oden/theme.less"
touch src/Cos/Bundle/CosBundle/Resources/public/themes/oden/theme.less
done;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment