Last active
August 29, 2015 14:01
-
-
Save jwarby/f7dfdd95d56b37121faf to your computer and use it in GitHub Desktop.
Recompile all LESS files in a specified directory
This file contains 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 | |
# | |
# Recompiles all LESS files found (recursively) in the specified directory, e.g. | |
# | |
# [someome /public/css]$ recompile-less . | |
# or | |
# [someone /myapp]$ recompile-less public/css | |
find "$1" -name '*.less' | while read line; do | |
echo "Recompiling $line..." | |
REPLACE=`echo $line | sed "s|\.less|\.css|"` | |
(lessc "$line" "$REPLACE" &) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment