summaryrefslogtreecommitdiff
path: root/build/compile-gschemas.py
blob: f1800767bd2dc3a179e6782c4025362226afa971 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
# SPDX-FileCopyrightText: 2019 Philip Chimento <philip.chimento@gmail.com>

import os
import subprocess
import sys

if len(sys.argv) < 2:
    sys.exit("usage: compile-gschemas.py <schemadir>")

schemadir = sys.argv[1]

if os.environ.get('DESTDIR') is None:
    print('Compiling GSettings schemas...')
    subprocess.call(['glib-compile-schemas', schemadir])