summaryrefslogtreecommitdiff
path: root/meson_postinstall.py
blob: bf0d44f02e4f0c49e6f3ae10855d04b39ddc63f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/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(['gtk4-update-icon-cache', '-qtf',
                     os.path.join(datadir, 'icons', 'hicolor')])