| 1 |
#!/usr/bin/env python3 |
| 2 |
|
| 3 |
from os import environ, path |
| 4 |
from subprocess import call |
| 5 |
|
| 6 |
prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local') |
| 7 |
datadir = path.join(prefix, 'share') |
| 8 |
destdir = environ.get('DESTDIR', '') |
| 9 |
|
| 10 |
# Package managers set this so we don't need to run |
| 11 |
if not destdir: |
| 12 |
print('Updating icon cache...') |
| 13 |
call(['gtk-update-icon-cache', '-qtf', path.join(datadir, 'icons', 'hicolor')]) |
| 14 |
|
| 15 |
print('Updating desktop database...') |
| 16 |
call(['update-desktop-database', '-q', path.join(datadir, 'applications')]) |
| 17 |
|
| 18 |
print('Compiling GSettings schemas...') |
| 19 |
call(['glib-compile-schemas', path.join(datadir, 'glib-2.0', 'schemas')]) |
| 20 |
|
| 21 |
|