mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
scripts: Add $DESTDIR support to meson-install-web.py
meson already supports $DESTDIR natively, but in this case we're using a custom script and so we have to do some extra work ourselves. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
b2f1daa36d
commit
03ba5f68b8
@ -4,7 +4,11 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
destdir = os.environ.get('DESTDIR', os.sep)
|
||||||
|
|
||||||
for desc in sys.argv[1:]:
|
for desc in sys.argv[1:]:
|
||||||
inst = desc.split(':')
|
inst = desc.split(':')
|
||||||
os.makedirs(inst[1], exist_ok=True)
|
src = inst[0]
|
||||||
shutil.copy(inst[0], inst[1])
|
dst = os.path.join(destdir, inst[1].strip(os.sep))
|
||||||
|
os.makedirs(dst, exist_ok=True)
|
||||||
|
shutil.copy(src, dst)
|
||||||
|
Loading…
Reference in New Issue
Block a user