[devhelp] meson: post-install: do nothing if DESTDIR env variable set
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] meson: post-install: do nothing if DESTDIR env variable set
- Date: Fri, 23 Mar 2018 09:28:01 +0000 (UTC)
commit b39229740f1e2a57e89579ab2516b0f6234ec979
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Mar 23 10:15:25 2018 +0100
meson: post-install: do nothing if DESTDIR env variable set
If DESTDIR was set, the commands were not executed in the good
directories.
meson_post_install.py | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/meson_post_install.py b/meson_post_install.py
index 9c80a73..2844696 100644
--- a/meson_post_install.py
+++ b/meson_post_install.py
@@ -6,10 +6,11 @@ import sys
data_dir = sys.argv[1]
-icon_dir = os.path.join(data_dir, 'icons', 'hicolor')
-print('Update icon cache...')
-subprocess.call(['gtk-update-icon-cache', '-f', '-t', icon_dir])
+if not os.environ.get('DESTDIR'):
+ icon_dir = os.path.join(data_dir, 'icons', 'hicolor')
+ print('Update icon cache...')
+ subprocess.call(['gtk-update-icon-cache', '-f', '-t', icon_dir])
-schema_dir = os.path.join(data_dir, 'glib-2.0', 'schemas')
-print('Compiling gsettings schemas...')
-subprocess.call(['glib-compile-schemas', schema_dir])
+ schema_dir = os.path.join(data_dir, 'glib-2.0', 'schemas')
+ print('Compiling gsettings schemas...')
+ subprocess.call(['glib-compile-schemas', schema_dir])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]