summaryrefslogtreecommitdiff
path: root/meson_post_install.py
blob: bf71922d1e8ef03c1682611e70b3a9381edd77df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env python3

import os
import subprocess
import sys

if not os.environ.get('DESTDIR') and sys.argv[1] == 'icon_update':
  prefix = os.environ['MESON_INSTALL_PREFIX']

  icondir = os.path.join(prefix, sys.argv[2], 'icons', 'hicolor')
  print('Update icon cache...')
  subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])