1#!/usr/local/bin/python3.8 2 3from os import environ, path 4from subprocess import call 5 6prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local') 7datadir = path.join(prefix, 'share') 8destdir = environ.get('DESTDIR', '') 9 10# Package managers set this so we don't need to run 11if 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 22