"Fossies" - the Fresh Open Source Software Archive

Member "revelation-0.5.4/meson_post_install.py" (4 Oct 2020, 1105 Bytes) of package /linux/privat/revelation-0.5.4.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "meson_post_install.py" see the Fossies "Dox" file reference documentation.

    1 #!/usr/bin/env python3
    2 
    3 import os
    4 import subprocess
    5 
    6 prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')
    7 datadir = os.path.join(prefix, 'share')
    8 
    9 # Packaging tools define DESTDIR and this isn't needed for them
   10 if 'DESTDIR' not in os.environ:
   11     print('Updating icon cache…')
   12     icon_cache_dir = os.path.join(datadir, 'icons', 'hicolor')
   13     subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir])
   14     icon_cache_dir = os.path.join(datadir, 'revelation', 'icons', 'hicolor')
   15     subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir])
   16 
   17     print("Compiling the schema…")
   18     schemas_dir = os.path.join(datadir, 'glib-2.0/schemas')
   19     subprocess.call(['glib-compile-schemas', schemas_dir])
   20 
   21     print('Updating desktop database…')
   22     desktop_database_dir = os.path.join(datadir, 'applications')
   23     subprocess.call(['update-desktop-database', '-q', desktop_database_dir])
   24 
   25     print("Update mime database…")
   26     mime_dir = os.path.join(datadir, 'mime')
   27     #subprocess.call(['mkdir', '-p', mime_dir])
   28     subprocess.call(['update-mime-database', '-n', mime_dir])