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.
pull/165/head
Rob Loranger 5 years ago
parent 8557119451
commit 3c104cb3aa
No known key found for this signature in database
GPG Key ID: D6F1633A4F0903B8
  1. 13
      less/Makefile

@ -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…
Cancel
Save