Commit c5ee1d71 authored by Iñigo Martínez's avatar Iñigo Martínez Committed by Kai Lüke

build: Use datadir on post install script

The previous approach used a fixed path for datadir. However,
its location might change.

This patch uses the provided datadir path, if the user provides one,
or the default path.
parent 0dfd52c5
......@@ -132,7 +132,10 @@ configure_file(
configuration: config_h
output = '\n gnome-disk-utility ' + gdu_version + '\n'
output += ' =========================\n\n'
......@@ -2,14 +2,15 @@
import os
import subprocess
install_prefix = os.environ['MESON_INSTALL_PREFIX']
icondir = os.path.join(install_prefix, 'share', 'icons', 'hicolor')
schemadir = os.path.join(install_prefix, 'share', 'glib-2.0', 'schemas')
import sys
if not os.environ.get('DESTDIR'):
datadir = sys.argv[1]
icondir = os.path.join(datadir, 'icons', 'hicolor')
print('Update icon cache...')['gtk-update-icon-cache', '-f', '-t', icondir])
print('Compiling gsettings schemas...')
schemadir = os.path.join(datadir, 'glib-2.0', 'schemas')
print('Compile gsettings schemas...')['glib-compile-schemas', schemadir])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment