Last active
August 29, 2015 14:03
-
-
Save fluffels/f749fee4a72ebad57c4d to your computer and use it in GitHub Desktop.
Dumb make system that recompiles updated LESS files.
This file contains hidden or 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
SOURCE_FILES=main.less | |
SOURCE_PATH=src/less/ | |
TARGET_PATH=css/ | |
SOURCES=$(addprefix ${SOURCE_PATH}, ${SOURCE_FILES}) | |
SOURCES_AND_LIBS=$(shell find ${SOURCE_PATH} -name '*.less') | |
TARGETS=$(addprefix ${TARGET_PATH}, $(addsuffix .css, $(basename ${SOURCE_FILES}))) | |
all: ${TARGETS} | |
${TARGET_PATH}%.css: ${SOURCE_PATH}%.less ${SOURCES_AND_LIBS} | |
lessc $< > $@ |
This file contains hidden or 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
#!/usr/bin/env sh | |
while true | |
do | |
inotifywait -q -e modify `find src/less/ -name '*.less'` | |
make | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment