diff --git a/build-aux/meson_post_install.py b/build-aux/meson_post_install.py index 8cd5ad8..aefcadf 100644 --- a/build-aux/meson_post_install.py +++ b/build-aux/meson_post_install.py @@ -7,10 +7,12 @@ import subprocess install_prefix = os.environ['MESON_INSTALL_PREFIX'] if not os.environ.get('DESTDIR'): - print('Updating icon cache…') icon_cache_dir = os.path.join(install_prefix, 'share', 'icons', 'hicolor') - subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir]) + if os.path.exists(icon_cache_dir): + print('Updating icon cache…') + subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir]) - print('Updating desktop database…') desktop_database_dir = os.path.join(install_prefix, 'share', 'applications') - subprocess.call(['update-desktop-database', '-q', desktop_database_dir]) + if os.path.exists(desktop_database_dir): + print('Updating desktop database…') + subprocess.call(['update-desktop-database', '-q', desktop_database_dir])