summaryrefslogtreecommitdiff
path: root/meson_post_install.py
blob: 02a57a2198ffb528edffa80bfbf2c199d045db77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python3

import os
import subprocess
import sys

gsettingsschemadir = os.path.join(sys.argv[1], 'glib-2.0', 'schemas')
icondir = os.path.join(sys.argv[1], 'icons', 'hicolor')
mimedir = os.path.join(sys.argv[1], 'mime')

if not os.environ.get('DESTDIR'):
  print('Compiling gsettings schemas...')
  subprocess.call(['glib-compile-schemas', gsettingsschemadir])

  print('Update icon cache...')
  subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])

  print('Update mime database...')
  subprocess.call(['update-mime-database', '-V', mimedir])