Skip to content

Instantly share code, notes, and snippets.

@lejenome
Forked from sontek/gist:1522303
Created February 23, 2013 21:16
Show Gist options
  • Save lejenome/5021364 to your computer and use it in GitHub Desktop.
Save lejenome/5021364 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
while :; do
find "$PWD" -name '*.less' | while read line; do
REPLACE=`echo $line | sed "s|\.less|\.css|"`
mt1=$(stat -c %Y $line)
mt2=$(stat -c %Y $REPLACE)
if [ "$mt1" -gt "$mt2" ]; then
echo "$line --> $REPLACE"
lessc --verbose "$line" "$REPLACE"
fi
done
sleep 2
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment