meson_post_install.py 420 Bytes
Newer Older
1 2 3 4
#!/usr/bin/env python3

import os
import subprocess
Robert Roth's avatar
Robert Roth committed
5
import sys
6 7

if not os.environ.get('DESTDIR'):
Robert Roth's avatar
Robert Roth committed
8 9
  icon_dir = os.path.join(sys.argv[1], 'icons', 'hicolor')
  schema_dir = os.path.join(sys.argv[1], 'glib-2.0', 'schemas')
10
  print('Update icon cache...')
Robert Roth's avatar
Robert Roth committed
11
  subprocess.call(['gtk-update-icon-cache', '-f', '-t', icon_dir])
12 13

  print('Compiling gsettings schemas...')
Robert Roth's avatar
Robert Roth committed
14
  subprocess.call(['glib-compile-schemas', schema_dir])
15