summaryrefslogtreecommitdiffstats
path: root/meson/generate-stylesheets.py
diff options
context:
space:
mode:
Diffstat (limited to 'meson/generate-stylesheets.py')
-rw-r--r--meson/generate-stylesheets.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/meson/generate-stylesheets.py b/meson/generate-stylesheets.py
new file mode 100644
index 0000000..bd6b641
--- /dev/null
+++ b/meson/generate-stylesheets.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python3
+
+import os
+from pathlib import PurePath
+import subprocess
+
+stylesheets = [
+ 'data/theme/gnome-shell-high-contrast.css',
+ 'data/theme/gnome-shell.css'
+]
+
+sourceroot = os.environ.get('MESON_SOURCE_ROOT')
+distroot = os.environ.get('MESON_DIST_ROOT')
+
+for stylesheet in stylesheets:
+ stylesheet_path = PurePath(stylesheet)
+ src = PurePath(sourceroot, stylesheet_path.with_suffix('.scss'))
+ dst = PurePath(distroot, stylesheet_path)
+ subprocess.run(['sassc', '-a', src, dst], check=True)