blob: 0fc76287afb7d425812f4706cad7d1c23a92d816 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/usr/bin/env python3
# Copyright 2022 Collabora Ltd.
# SPDX-License-Identifier: MIT
# Compatibility shim for installing empty directories with Meson < 0.60
import os
import sys
from pathlib import Path
for d in sys.argv[1].split(':'):
if os.path.isabs(d) and 'DESTDIR' in os.environ:
p = Path(d)
d = p.relative_to(p.anchor)
dest = os.path.join(os.environ['DESTDIR'], d)
else:
dest = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], d)
os.makedirs(dest, mode=0o755, exist_ok=True)
|