Skip to content
Create a gist now

Instantly share code, notes, and snippets. in bash
if [ ! -d $1 ]; then
echo "Not a directory: $1"
exit -1
while read line; do
filename="$(basename $line)"
if [ "${filename##*.}" == "less" ]; then
path="$(dirname $line)"
lessc -x "${line}" > \
"${path}/../css/`echo ${filename} | cut -f1 -d. -`.css";
done < <(inotifywait -r -q -m -e MODIFY --format '%w%f' $1);


seletz commented Sep 22, 2011


Note that instead of the mostly unreadable backticks, you can use $() when using bash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.