build: get list of themes regardless of themes.json (#26857)

This commit is contained in:
Frédéric Péters 2018-10-01 14:48:44 +02:00
parent 2b493c1900
commit efafb3f5eb
2 changed files with 11 additions and 1 deletions

View File

@ -22,7 +22,7 @@ themes.json: $(wildcard static/*/config.json)
%.css: %.scss $(wildcard static/includes/*.scss) static/includes/_data_uris.scss static/grandlyon-gnm/_data_uris.scss static/toodego/_data_uris.scss $$(wildcard $$(@D)/*.scss)
sass $< $@
css: $(wildcard static/*/style.css)
css: $(shell python get_themes.py)
rm -rf static/*/.sass-cache/
icons:
@ -57,6 +57,7 @@ DIST_FILES = \
Makefile \
desc.xml \
create_themes_json.py \
get_themes.py \
make_data_uris.py \
static templates \
src

9
get_themes.py Normal file
View File

@ -0,0 +1,9 @@
#! /usr/bin/env python
import os
for dirname in sorted(os.listdir('static')):
config = os.path.join('static', dirname, 'config.json')
if not os.path.exists(config):
continue
print 'static/%s/style.css' % dirname