Projet

Général

Profil

0002-build-get-list-of-themes-regardless-of-themes.json-2.patch

Frédéric Péters, 01 octobre 2018 14:50

Télécharger (1,39 ko)

Voir les différences:

Subject: [PATCH 2/2] build: get list of themes regardless of themes.json
 (#26857)

 Makefile      | 3 ++-
 get_themes.py | 9 +++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
 create mode 100644 get_themes.py
Makefile
22 22
%.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)
23 23
	sass $< $@
24 24

  
25
css: $(wildcard static/*/style.css)
25
css: $(shell python get_themes.py)
26 26
	rm -rf static/*/.sass-cache/
27 27

  
28 28
icons:
......
57 57
	Makefile \
58 58
	desc.xml \
59 59
	create_themes_json.py \
60
	get_themes.py \
60 61
	make_data_uris.py \
61 62
	static templates \
62 63
	src
get_themes.py
1
#! /usr/bin/env python
2

  
3
import os
4

  
5
for dirname in sorted(os.listdir('static')):
6
    config = os.path.join('static', dirname, 'config.json')
7
    if not os.path.exists(config):
8
        continue
9
    print 'static/%s/style.css' % dirname
0
-