blob: 9e5cbdf4939540961b4408ca32d7c9a9f6f28a52 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/usr/bin/env python3
import os
import subprocess
import sys
# Env
install_prefix = os.environ['MESON_INSTALL_DESTDIR_PREFIX']
# Args
datadir = sys.argv[1]
icondir = os.path.join(install_prefix, datadir, 'icons', 'hicolor')
schemadir = os.path.join(install_prefix, datadir, 'glib-2.0', 'schemas')
mimedatabasedir = os.path.join(install_prefix, datadir, 'mime')
# We don't want to mess around when packaging environments
if os.environ.get('DESTDIR'):
sys.exit(0)
print('Update icon cache...')
subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
print('Compiling gsettings schemas...')
subprocess.call(['glib-compile-schemas', schemadir])
print('Updating MIME database...')
subprocess.call(['update-mime-database', mimedatabasedir])
|