Skip to content

@malthe /less.app
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
less.app in bash
#!/bin/bash
if [ ! -d $1 ]; then
echo "Not a directory: $1"
exit -1
fi
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";
fi;
done < <(inotifywait -r -q -m -e MODIFY --format '%w%f' $1);
@reedobrien

awesome

@seletz

cool.

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.