File: post_install.py

package info (click to toggle)
minder 2.0.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,736 kB
  • sloc: xml: 799; sh: 112; python: 87; ansic: 78; makefile: 5; tcl: 4
file content (18 lines) | stat: -rwxr-xr-x 761 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python3

from os import path, environ
import subprocess

prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local')
schemadir = path.join(environ['MESON_INSTALL_PREFIX'], 'share', 'glib-2.0', 'schemas')
datadir = path.join(prefix, 'share')

if not environ.get('DESTDIR'):
    print('Compiling gsettings schemas…')
    subprocess.call(['glib-compile-schemas', schemadir])
    print('Updating icon cache…')
    subprocess.call(['gtk-update-icon-cache', '-qtf', path.join(datadir, 'icons', 'hicolor')])
    print('Compiling mime types…')
    subprocess.call(['update-mime-database', path.join(datadir, 'mime')])
    print('Updating application database…')
    subprocess.call(['update-desktop-database', path.join(datadir, 'applications')])