1#!/usr/bin/env python3 2 3import os 4import pathlib 5import subprocess 6 7prefix = pathlib.Path(os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')) 8datadir = prefix / 'share' 9destdir = os.environ.get('DESTDIR', '') 10 11if not destdir: 12 print('Compiling gsettings schemas...') 13 subprocess.call(['glib-compile-schemas', str(datadir / 'glib-2.0' / 'schemas')]) 14 15 print('Updating icon cache...') 16 subprocess.call(['gtk-update-icon-cache', '-qtf', str(datadir / 'icons' / 'hicolor')]) 17 18 print('Updating desktop database...') 19 subprocess.call(['update-desktop-database', '-q', str(datadir / 'applications')]) 20