Codebase list gnome-recipes / run/74e76e1d-34bd-4123-bfa7-7c5f52a00b9c/main meson_post_install.py
run/74e76e1d-34bd-4123-bfa7-7c5f52a00b9c/main

Tree @run/74e76e1d-34bd-4123-bfa7-7c5f52a00b9c/main (Download .tar.gz)

meson_post_install.py @run/74e76e1d-34bd-4123-bfa7-7c5f52a00b9c/mainraw · history · blame

#!/usr/bin/env python3

import os
import subprocess

prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')
datadir = os.path.join(prefix, 'share')

# Packaging tools define DESTDIR and this isn't needed for them
if 'DESTDIR' not in os.environ:
    print('Updating icon cache...')
    subprocess.call(['gtk-update-icon-cache', '-qtf',
                     os.path.join(datadir, 'icons', 'hicolor')])

    print('Updating desktop database...')
    subprocess.call(['update-desktop-database', '-q',
                    os.path.join(datadir, 'applications')])

    print('Compiling GSettings schemas...')
    subprocess.call(['glib-compile-schemas',
                    os.path.join(datadir, 'glib-2.0', 'schemas')])