check for lessc executable in any location
previously the checks were explicit locations which does not work when using something like nvm to manage node packages and versions. this checks for the executable and sets the script variable LESSC to the full path of the one found. if none was found the make command will error.
This commit is contained in:
parent
8557119451
commit
3c104cb3aa
1 changed files with 4 additions and 9 deletions
|
@ -1,13 +1,8 @@
|
||||||
ifeq ($(shell which lessc),/usr/bin/lessc)
|
LESSC := $(shell command -v lessc 2> /dev/null)
|
||||||
LESSC=/usr/bin/lessc
|
|
||||||
else ifeq ($(shell which lessc),/usr/local/bin/lessc)
|
ifndef LESSC
|
||||||
LESSC=/usr/local/bin/lessc
|
$(error "less is not installed, please run install-less.sh")
|
||||||
else ifeq ($(shell which lessc),/bin/lessc)
|
|
||||||
LESSC=/bin/lessc
|
|
||||||
else
|
|
||||||
LESSC=node_modules/.bin/lessc
|
|
||||||
endif
|
endif
|
||||||
export LESSC
|
|
||||||
|
|
||||||
CSSDIR=../static/css/
|
CSSDIR=../static/css/
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue