]> jfr.im git - irc/hexchat/hexchat.git/blob - meson_post_install.py
checksum: Replace GString usage with regular strings
[irc/hexchat/hexchat.git] / meson_post_install.py
1 #!/usr/bin/env python3
2
3 import os
4 import sys
5 import subprocess
6
7 prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')
8 datadir = os.path.join(prefix, 'share')
9 with_thememan = sys.argv[1] == 'true'
10
11 # Packaging tools define DESTDIR and this isn't needed for them
12 if 'DESTDIR' not in os.environ:
13 print('Updating icon cache...')
14 subprocess.call(['gtk-update-icon-cache', '-qtf',
15 os.path.join(datadir, 'icons', 'hicolor')])
16
17 print('Updating desktop database...')
18 subprocess.call(['update-desktop-database', '-q',
19 os.path.join(datadir, 'applications')])
20
21 if with_thememan:
22 print('Updating mime database...')
23 subprocess.call(['update-mime-database',
24 os.path.join(datadir, 'mime')])