summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPavel Hrdina <phrdina@redhat.com>2020-07-23 13:00:08 +0200
committerPavel Hrdina <phrdina@redhat.com>2020-08-03 09:27:05 +0200
commitc957791859411fba5cea59719386017b4bdfebf2 (patch)
tree76cb33d10e310832970ca8cdca89f54a37b145a8 /scripts
parentf7ca387fa66479b70041b5e4d5b7bf147c65e8d2 (diff)
downloadlibvirt-c957791859411fba5cea59719386017b4bdfebf2.tar.gz
meson: src/network: install default network xml
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/meson-install-symlink.py15
-rw-r--r--scripts/meson.build1
2 files changed, 16 insertions, 0 deletions
diff --git a/scripts/meson-install-symlink.py b/scripts/meson-install-symlink.py
new file mode 100644
index 0000000000..e38507072d
--- /dev/null
+++ b/scripts/meson-install-symlink.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+
+destdir = os.environ.get('DESTDIR', os.sep)
+dirname = sys.argv[1]
+target = sys.argv[2]
+link = sys.argv[3]
+
+workdir = os.path.join(destdir, dirname.strip(os.sep))
+
+os.makedirs(workdir, exist_ok=True)
+os.chdir(workdir)
+os.symlink(target, link)
diff --git a/scripts/meson.build b/scripts/meson.build
index bd641236a2..e1ecda2a0c 100644
--- a/scripts/meson.build
+++ b/scripts/meson.build
@@ -21,6 +21,7 @@ scripts = [
'meson-gen-def.py',
'meson-gen-sym.py',
'meson-install-dirs.py',
+ 'meson-install-symlink.py',
'meson-python.sh',
'mock-noinline.py',
'prohibit-duplicate-header.py',